Skip to content

replaced direct class in instance creation#642

Closed
dmishh wants to merge 1 commit intodoctrine:masterfrom
dmishh:patch-1
Closed

replaced direct class in instance creation#642
dmishh wants to merge 1 commit intodoctrine:masterfrom
dmishh:patch-1

Conversation

@dmishh
Copy link

@dmishh dmishh commented Apr 4, 2013

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

return new EntityManager() -> return new static() on line 945
made code more reusable
@doctrinebot
Copy link

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

@Ocramius
Copy link
Member

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
@DavertMik
Copy link

why it's not final then?

@Ocramius
Copy link
Member

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)

@guilhermeblanco
Copy link
Member

@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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants