[PR #8957] Only wire ConnectionHelper if it's available #11285

Closed
opened 2026-01-22 16:10:16 +01:00 by admin · 0 comments
Owner

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

State: closed
Merged: Yes


DBAL deprecated its ConnectionHelper class, a helper for Symfony console applications. I propose to not use that class if it's not there.

Part of #8884, #8885.

I haven't found any tests nor usage of the createHelperSet() method I've changed here. The other helper that is wired here simply exposes a getEntityManager() method that… well… returns an entity manager. In modern Symfony applications, we would probably use DI to make the EM available to commands. I feel like we should follow the example of DBAL here and deprecate createHelperSet(), EntityManagerHelper and related classes and change our own commands to use DI instead. That could be done in a follow-up PR. WDYT?

**Original Pull Request:** https://github.com/doctrine/orm/pull/8957 **State:** closed **Merged:** Yes --- DBAL deprecated its `ConnectionHelper` class, a helper for Symfony console applications. I propose to not use that class if it's not there. Part of #8884, #8885. I haven't found any tests nor usage of the `createHelperSet()` method I've changed here. The other helper that is wired here simply exposes a `getEntityManager()` method that… well… returns an entity manager. In modern Symfony applications, we would probably use DI to make the EM available to commands. I feel like we should follow the example of DBAL here and deprecate `createHelperSet()`, `EntityManagerHelper` and related classes and change our own commands to use DI instead. That could be done in a follow-up PR. WDYT?
admin added the pull-request label 2026-01-22 16:10:16 +01:00
admin closed this issue 2026-01-22 16:10:17 +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#11285