mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #9961] Deprecate EntityManager::create()
#12005
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/9961
State: closed
Merged: Yes
Now that the entity manager's constructor is public, why not make it the only way to construct an EM?
The only additional feature that
create()has is that you can pass the connection parameters instead of a real DBAL connection. However, I believe that bootstrapping the DBAL connection is a concern that belongs into the DBAL library and the DBAL'sDriverManagerclass already does a fine job in that regard.This is why I believe that we shouldn't need the
create()method anymore.