Symfony-Bundle icon indicating copy to clipboard operation
Symfony-Bundle copied to clipboard

Implementation of commands option --connection

Open homarx opened this issue 5 years ago • 2 comments

This PR adds new option "connection" to commands.

In an installation with multiple databases you can determine which connection to use for command.

As value for connection option the configured name is used (eg "mystorage1"):

doctrine: dbal: connections: mystorage1: ... mystorage2: ... orm: auto_mapping: true

To achieve this service decorators are implemented for Manager and Resolver class in order to inject entity manager with given connection.

Moreover it is respected that start command transfers the connection option (if it is set) to run command.

homarx avatar May 03 '19 13:05 homarx

The Travis checks failed, because db table cron_job (and cron_report) can't be found. I tried to set ORM naming strategy to underscore in config.yml but this doesn't work anyway. Can somebody help me in this case?

homarx avatar May 06 '19 08:05 homarx

Hu? Whats next? Need this feature too.

timrasche avatar Aug 27 '19 13:08 timrasche