Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Invalid
-
Affects Version/s: 2.3.1
-
Fix Version/s: None
-
Component/s: ORM
-
Labels:None
Description
public static function create($conn, Configuration $config, EventManager $eventManager = null) { // ... return new EntityManager($conn, $config, $conn->getEventManager()); }
The EntityManager::create method uses new on the EntityManager class instead of static.
This makes extending that class not practical because we have to rewrite (duplicate) EntityManager::create.
Code could be extendable with:
public static function create($conn, Configuration $config, EventManager $eventManager = null) { // ... return new static($conn, $config, $conn->getEventManager()); }
Pull request is here: https://github.com/doctrine/doctrine2/pull/535