migrations
migrations copied to clipboard
ConsoleLogger not used if command is called with --em option
ConsoleLogger won't be set as Logger-service if command is called with --em option
Example command call doctrine:migrations:migrate --em={your_entity_manager_name}
Reason
- The function private function setNamedEmOrConnection(InputInterface $input) calls $this->dependencyFactory->getConfiguration(), which freezes dependencyFactory and prevents the setting of ConsoleLogger to command later in the line https://github.com/doctrine/migrations/blob/d7198118934b360f3a82a919c0fca9515b8de46a/lib/Doctrine/Migrations/Tools/Console/Command/DoctrineCommand.php#L100
- I havent't seen other possibility to set ConsoleLogger as LoggerInterface