replaced direct class in instance creation #642

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
5 participants

dmishh commented Apr 4, 2013

return new EntityManager() -> return new static() on line 945
made code more reusable

replaced direct class in instance creation
return new EntityManager() -> return new static() on line 945
made code more reusable

Hello,

thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:

http://doctrine-project.org/jira/browse/DDC-2389

Owner

Ocramius commented Apr 4, 2013

@dmishh the EntityManager is not meant to be extended. Use the Doctrine\Common\Persistence\ObjectManager interface and composition instead.

@Ocramius Ocramius closed this Apr 4, 2013

why it's not final then?

Owner

Ocramius commented Apr 4, 2013

@DavertMik can't change it now because of BC compatibility. I agree it should be (especially to avoid this kind of PR that always pops up)

Owner

guilhermeblanco commented Apr 5, 2013

@DavertMik It can't be final because we require to Mock it for testing purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment