-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PropertyAccess] BC break on getsetter order #37260
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
Comments
Can you try 5.1.1? |
Same issue |
#37053 does not fix this? |
Unfortunately not. That issue is related to prefixed accessors ( In Symfony prior to 5.1.0 the order was: |
@xabbuh is any more feedback needed ? |
I didn't try it out but your last comment reads like one should be able to reproduce what you reported now. |
I would like to work on fixing this, but it will require to stop using the |
Sounds like that's the way to go. |
Hey, thanks for your report! |
Friendly reminder that this issue exists. If I don't hear anything I'll close this. |
Hey, I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen! |
Symfony version(s) affected: 5.1.0+
Description
Prior to 5.1.0 the
getsetter
method was checked second aftergetter
.See https://github.com/symfony/symfony/blob/v5.0.9/src/Symfony/Component/PropertyAccess/PropertyAccessor.php#L479-L482 for prior logic.
After moving the logic into the PropertyInfo component get
getsetter
is checked after prefixed accessors.See https://github.com/symfony/property-info/blob/master/Extractor/ReflectionExtractor.php#L239-L253
How to reproduce
Given the following class
trying to access
payments
will return a boolean value instead of the the array by accessing thehasPayments()
instead of thepayments()
method.The text was updated successfully, but these errors were encountered: