[PR #6379] EntityManager: Implement singleton pattern, use global injection (minor BC break) #9957

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

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

State: closed
Merged: No


As per the article, since Doctrine is moving to modern static interface, let's start immediately with EntityManager.

This PR introduces:

  • Singleton pattern - Why should anyone track the instance? Let EntityManager do it itself!
  • Global injection - Parameters are boring, this is easier.

Targets 2.5 as this should be introduced ASAP - preferably in the next bugfix version.

TODO:

  • Fix tests.
**Original Pull Request:** https://github.com/doctrine/orm/pull/6379 **State:** closed **Merged:** No --- As per [the article](http://www.doctrine-project.org/2017/04/01/announcing-doctrine-4.html), since Doctrine is moving to modern static interface, let's start immediately with EntityManager. This PR introduces: * Singleton pattern - Why should anyone track the instance? Let EntityManager do it itself! * Global injection - Parameters are boring, this is easier. Targets 2.5 as this should be introduced ASAP - preferably in the next bugfix version. TODO: * [ ] Fix tests.
admin added the pull-request label 2026-01-22 16:05:59 +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#9957