-
-
Couldn't load subscription status.
- Fork 73
Description
Feature Request
What
Since doctrine/orm#11659, the way to access the value of a field has changed. This change required a patch in Symfony symfony/symfony#59887 that then have to be patched again for ODM symfony/symfony#60953
In order to establish a safe way to get and set the property values of an object through its class metadata, the methods getFieldValue($object) and setFieldValue($object, $value) need to be defined in the interface.
This method already exist in implementations:
- ORM: https://github.com/doctrine/orm/blob/ee919d62315680a607331d1cf0852c874362b522/src/Mapping/ClassMetadata.php#L686
- ODM: https://github.com/doctrine/mongodb-odm/blob/6f4f0fbc51e918144839de0ca5377ed5dcec3b3f/lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadata.php#L1913
Why
Accessing a field value need to be in a common interface, that all Doctrine ORM/ODM projects can implement.
How
Adding a method to an interface is a breaking change; in order to introduce this new method, a new interface can be introduced.