[RFC] [PropertyAccess] Allow using read and write access info for users #26613
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal of this PR is to be able to retrieve more informations on the read / write acess info (accessor / mutator).
I have an use case where i need to get which accessor or mutator is used to read or write on a property for a specific class. My intent behind that is to generate the code instead of relying on the property acessor component, as i know that my schema will not change (or that the changes are never done on runtime and can be cached at each deployement). To be more clear this is something that i need to redo #17516 (but in a different way)
However there is other ways to do that and i am not sure that this change should be here, as there is some options:
1. Public methods
This is the changes that are here, also instead of returning an array this method could provide an object.
A new interface would be created (in order to have BC with the existing PropertyAcessorInterface)
2. Porting this code to the PropertyInfo component
Getting the accessor / mutator info on a property may be more suitable in the PropertyInfo component. So this code would be ported to the PropertyInfo component. Then a follow up PR could make PropertyAccess use the data from the PropertyInfo component (however it would induce a new required dependency for the PropertyAccess component)
3. Not wanted
Just close this PR then :)
PS: This is cleary not a finished PR and changes are only here to better describe my intent, i will do a new PR (or not) depending on the following discussion (as this is a RFC)