Symfony-Bundle
Symfony-Bundle copied to clipboard
Implementation of commands option --connection
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.
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?
Hu? Whats next? Need this feature too.