[PR #9661] Deprecate the doctrine binary #11784

Open
opened 2026-01-22 16:11:54 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/9661

State: closed
Merged: Yes


Follows doctrine/dbal#5084
Part of #7498

This PR deprecates the vendor/bin/doctrine binary.

Today, the ORM is usually configured by some kind of framework integration, like DoctrineBundle. In those cases, the existence of a vendor/bin/doctrine binary is highly confusing. When invoking it, the binary will simply not work and tell the user to create some configuration file. This is misleading because the integration package will most likely take care of boostrapping the entity manager and sets up the commands properly. In the context of a full-stack Symfony application, DoctrineBundle would merge the ORM's commands into the applications bin/console script.

Of course, there's still the possibility of using the ORM standalone. For this case, I have documented how to set up the a bin/doctrine binary. Setting up that binary is not really more complicated than setting up the cli-config.php script that would be required to make the vendor/bin/doctrine script work.

Moreover, it puts the developer in control over how the console is bootstrapped for their application. They can find out more easily how to set up the console for multiple entity managers or how to add more commands to it.

**Original Pull Request:** https://github.com/doctrine/orm/pull/9661 **State:** closed **Merged:** Yes --- Follows doctrine/dbal#5084 Part of #7498 This PR deprecates the `vendor/bin/doctrine` binary. Today, the ORM is usually configured by some kind of framework integration, like DoctrineBundle. In those cases, the existence of a `vendor/bin/doctrine` binary is highly confusing. When invoking it, the binary will simply not work and tell the user to create some configuration file. This is misleading because the integration package will most likely take care of boostrapping the entity manager and sets up the commands properly. In the context of a full-stack Symfony application, DoctrineBundle would merge the ORM's commands into the applications `bin/console` script. Of course, there's still the possibility of using the ORM standalone. For this case, I have documented how to set up the a `bin/doctrine` binary. Setting up that binary is not really more complicated than setting up the `cli-config.php` script that would be required to make the `vendor/bin/doctrine` script work. Moreover, it puts the developer in control over how the console is bootstrapped for their application. They can find out more easily how to set up the console for multiple entity managers or how to add more commands to it.
admin added the pull-request label 2026-01-22 16:11:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#11784