-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add types to entity manager #9292
Conversation
use function array_fill; | ||
use function in_array; | ||
|
||
class EntityManagerDecoratorTest extends TestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As soon as we add return types, this test is broken beyond repair because it violates the type contracts almost everywhere. 🙁
da93a8a
to
a0f7d27
Compare
|
a0f7d27
to
e81ce76
Compare
e81ce76
to
a7a0d04
Compare
How did you decide where you wanted to add a type and where not? For example, why did public function getClassMetadata($className): ClassMetadata
{
return parent::getClassMetadata($className);
} |
I want to add them everywhere. 🙂
The interface that is implemented here originates in the persitence repository: PHP does not allow me to add native parameter types downstream (except for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I forgot about the dependency to Persistence and a reminder to update it too.
This PR adds native parameter, return and property types to our entity manager implementations.