Skip to content

[Serializer] Prevent access to private properties without getters #40004

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

julienfalque
Copy link
Contributor

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

When upgrading symfony/serializer from v5.2.1 to v5.2.2, the serializer starts throwing exceptions because it cannot access some private properties that don't have a getter. This looks related to #38900.

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too bad we missed this!

@nicolas-grekas
Copy link
Member

Thank you @julienfalque.

@nicolas-grekas nicolas-grekas merged commit 8533ea2 into symfony:4.4 Jan 27, 2021
@julienfalque julienfalque deleted the serializer-private-properties-without-getters branch January 27, 2021 19:02
@julienfalque
Copy link
Contributor Author

Thank you @nicolas-grekas :)

@andrzej-tracz
Copy link

@nicolas-grekas
This change has been merged into branch 4.4 but for some reason the most recent release - v4.4.19 doesn't contain that:

https://github.com/symfony/symfony/blob/v4.4.19/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php#L110

this bug still appears on v4.4.19 and PHP version < 7.4.

@nicolas-grekas
Copy link
Member

It's for v4.4.20 apparently: https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php#L110

@fabpot fabpot mentioned this pull request Mar 4, 2021
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.

4 participants