Skip to content

cli-config.php compatibility with DBAL  #8327

@PowerKiKi

Description

@PowerKiKi

Since DBAL 2.11.0 and doctrine/dbal#3956, it is now deprecated to use HelperSet in cli-config.php. This will become impossible in DBAL 3, following doctrine/dbal#4059.

This means that, in order to keep sharing a single config file for both packages, this package should also accept the new \Doctrine\DBAL\Tools\Console\ConnectionProvider. It could actually be a new interface along the lines of:

namespace \Doctrine\ORM\Tools\Console;

interface EntityManagerProvider
    public function getEntityManager(string $name) : EntityManagerInterface;
}

I suppose the support of HelperSet could be drop entirely in the next major version too. So long we can use a HelperSetManagerProvider that extends the EntityManagerProvider.

All commands must be adjusted to access the entity manager from a provider instead of the HelperSet. Deprecation messages when using HelperSet must be thrown appropriately.

See related doctrine/migrations#1070

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions