Skip to content

[PropertyInfo] Make sure that SerializerExtractor returns null for invalid class metadata #59367

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

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

wuchen90
Copy link
Contributor

@wuchen90 wuchen90 commented Jan 6, 2025

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
License MIT

When we try to call getProperties with a classname that doesn't exist, the classMetadataFactory will break.
In this case, this method should return null in order to fallback to other instances of PropertyListExtractorInterface in case we're accessing this getProperties method with \Symfony\Component\PropertyInfo\PropertyInfoExtractor.

@wuchen90 wuchen90 requested a review from dunglas as a code owner January 6, 2025 11:27
@carsonbot carsonbot added this to the 6.4 milestone Jan 6, 2025
@carsonbot carsonbot changed the title fix(property-info): make sure that SerializerExtractor returns null for invalid class metadata [PropertyInfo] fix(property-info): make sure that SerializerExtractor returns null for invalid class metadata Jan 6, 2025
@nicolas-grekas nicolas-grekas changed the title [PropertyInfo] fix(property-info): make sure that SerializerExtractor returns null for invalid class metadata [PropertyInfo] Make sure that SerializerExtractor returns null for invalid class metadata Jan 6, 2025
@wuchen90 wuchen90 force-pushed the fix-serializer-extractor branch from df8f3b1 to 7bc832e Compare January 7, 2025 09:10
@nicolas-grekas
Copy link
Member

Thank you @wuchen90.

@nicolas-grekas nicolas-grekas merged commit d7e6148 into symfony:6.4 Jan 7, 2025
11 checks passed
@wuchen90 wuchen90 deleted the fix-serializer-extractor branch January 7, 2025 10:21
This was referenced Jan 29, 2025
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