Doctrine console commands em default should be null #6701

Closed
opened 2026-01-22 15:37:16 +01:00 by admin · 1 comment
Owner

Originally created by @simPod on GitHub (Apr 19, 2021).

Doctrine console commands now have a default value as default instead of null.

When em is set to null, the AbstractManagerRegistry's functionality kicks in and uses real default EntityManager ($this->defaultManager) https://github.com/doctrine/persistence/blob/2.2.x/lib/Doctrine/Persistence/AbstractManagerRegistry.php#L143-L146

Now's it looking for EM with name default which does not guarantee it's the default one.

https://github.com/doctrine/orm/blob/22413453daa872e121514bab1fe4c5fa982623ea/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php#L50

Doctrine ORM Manager named "default" does not exist.

Originally created by @simPod on GitHub (Apr 19, 2021). Doctrine console commands now have a default value as `default` instead of `null`. When `em` is set to `null`, the `AbstractManagerRegistry`'s functionality kicks in and uses real default EntityManager (`$this->defaultManager`) https://github.com/doctrine/persistence/blob/2.2.x/lib/Doctrine/Persistence/AbstractManagerRegistry.php#L143-L146 Now's it looking for EM with name `default` which does not guarantee it's the default one. https://github.com/doctrine/orm/blob/22413453daa872e121514bab1fe4c5fa982623ea/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php#L50 > Doctrine ORM Manager named "default" does not exist.
admin closed this issue 2026-01-22 15:37:16 +01:00
Author
Owner

@beberlei commented on GitHub (May 1, 2021):

Fixed by #8646

@beberlei commented on GitHub (May 1, 2021): Fixed by #8646
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6701