Use EntityManagerInterface in type declarations#9325
Use EntityManagerInterface in type declarations#9325derrabus merged 1 commit intodoctrine:2.11.xfrom
EntityManagerInterface in type declarations#9325Conversation
3aa4393 to
ba16229
Compare
|
I think @beberlei had a plan to kill that interface, not sure if this is the right move but I think he needs to review this. |
ba16229 to
c0f353f
Compare
|
@beberlei Do you have input on that topic? |
|
We introduced the interface to help with the use of The problem is in a decoration, code like Its a hard problem, it seems some people want to extend/decorate the EM for whatever reason, but its not a good solution for us. We could just give up and recommend extending |
|
So your plan would be to get rid of the interface (and consequently the abstract decorator) completely? That would generate the harder migration path for applications. Especially in Symfony applications, it is common to type-hint I agree that decorating the entity manager is not really a good way of extending the ORM. But at this point, I'd keep the interface tbh. |
c0f353f to
a0eef2d
Compare
beberlei
left a comment
There was a problem hiding this comment.
Probably a wishful thinking of me, but yeah it would have been nice. But you are right, we should just go with the interface now. 👍 from me then. One question, i would remove the trait and inline the code into AbstractIdGenerator, unless I am not seeing something.
2d4827c to
23f30ea
Compare
23f30ea to
6f1d171
Compare
6f1d171 to
be2924f
Compare
* 2.11.x: Use EntityManagerInterface in type declarations (doctrine#9325) Add errors caused by the lexer update to the baselines (doctrine#9360) Generated/Virtual Columns: Insertable / Updateable (doctrine#9118) Remove the composer/package-versions-deprecated package Relax assertion to include null as possible outcome (doctrine#9355)
The codebase inconsitently switched between
EntityManagerInterfaceandEntityManagerin type declarations. This will get us into trouble if we want to migrate to native type declarations on 3.0.This PR switches all type declarations to
EntityManagerInterfacewhere possible.