Skip to content

[RFC] [PropertyAccess] Allow using read and write access info for users #26613

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

Closed
wants to merge 1 commit into from

Conversation

joelwurtz
Copy link
Contributor

@joelwurtz joelwurtz commented Mar 21, 2018

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
License MIT

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)

@carsonbot carsonbot added Status: Needs Review RFC RFC = Request For Comments (proposals about features that you want to be discussed) PropertyAccess Bug Feature labels Mar 21, 2018
@nicolas-grekas nicolas-grekas added RFC RFC = Request For Comments (proposals about features that you want to be discussed) and removed Bug RFC RFC = Request For Comments (proposals about features that you want to be discussed) labels Mar 22, 2018
@nicolas-grekas nicolas-grekas added this to the 4.1 milestone Mar 22, 2018
@nicolas-grekas nicolas-grekas modified the milestones: 4.1, next Apr 20, 2018
@fabpot
Copy link
Member

fabpot commented Oct 10, 2018

I don't like option 1 very much. Option 2 might be the best choice (and I like 3 as well :))

@fabpot
Copy link
Member

fabpot commented Feb 21, 2019

@joelwurtz What's the status of this PR?

@joelwurtz
Copy link
Contributor Author

Those Accessor / Mutator extractors have been written in #30248 (since that where there are useful)

I think we can close this, and depending on what is discussed in #30248 i will make a new PR with those extractor

@joelwurtz joelwurtz closed this Feb 21, 2019
@joelwurtz joelwurtz deleted the patch-1 branch February 21, 2019 13:01
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature PropertyAccess RFC RFC = Request For Comments (proposals about features that you want to be discussed) Status: Needs Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants