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
symfony/property-access 6.4.6 breaks magic methods #54739
Comments
Looks like your class is missing the implementation of the public function __isset(string $name): bool
{
return null !== ($this->tests[$name] ?? null);
} |
this does not help to fix the behaviour. returns the same error. |
Here is the Code |
Same problem here |
There is an updated check for non-initialized properties which causes the issue: symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php Lines 414 to 426 in b7eb42e
Your magic public function __isset(string $name): bool
{
return true;
} |
yea that works but this is not obvious. |
Indeed, it's just a workaround. Friendly ping @nicolas-grekas who changed the implementation in commit 9610a7c. An I don't see any reason why this additional check exists. IMO, it's part of the |
i will add this here: |
@k0d3r1s Please open a new issue with a detailed reproducer. |
Same problem here, it break my applications |
That's because you're missing an implementation for __isset. While property access was tolerant to this, this breaks the behavior of objects with the php engine. |
I have no problem with that, but maybe it needs some doc update |
Maybe a note in the UPGRADE-6.4.md file? Up for a PR? |
@nicolas-grekas the examples on https://symfony.com/doc/current/components/property_access.html#magic-get-method should be fixed |
Symfony version(s) affected
6.4.6
Description
6.4.6 break magic methods.
How to reproduce
6.4.4 return null
6.4.6 return Can't get a way to read the property "Wouter" in class "test"
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: