Skip to content

[VarExporter] Fix instanciation test on PHP 8.2 with readonly properties #46851

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

Conversation

alexandre-daubois
Copy link
Member

Q A
Branch? 6.2
Bug fix? yes
New feature? no
Deprecations? no
Tickets NA
License MIT
Doc PR NA

src/Symfony/Component/VarExporter/Tests/InstantiatorTest::testInstantiate fails on PHP 8.2, on Symfony 6.2 only.
This fails because of an initialization of a readonly property outside of its class scope (see: https://php.watch/versions/8.1/readonly#init)

@nicolas-grekas
Copy link
Member

Thanks for having a look. That's not the right fix. The issue is that readonly props should never be bound by reference and hydrators do that right now. I fixed the issue in #46751 already.

@alexandre-daubois alexandre-daubois deleted the fix/varexporter-82-test branch July 5, 2022 08:29
@alexandre-daubois
Copy link
Member Author

Alright, thank you for the explanation @nicolas-grekas 🙏 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants