Skip to content
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

[PropertyInfo] Make sure nested composite types do not crash ReflectionExtractor #46968

Merged
merged 1 commit into from Jul 18, 2022

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Jul 18, 2022

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Part of #44282
License MIT
Doc PR N/A

A composite type like (\Traversable&\Countable)|null which is allowed in PHP 8.2 currently causes a fatal error in ReflectionExtractor because of a call to an undefined function. This PR fixes it by making ReflectionExtractor report that it could not extract any types.

Implementing full support for composite types to the extent that PHP 8.2 supports them would not be too difficult, but it would probably not pass as a bugfix. Once this is merged up, I'll prepare a PR for the 6.2 branch implementing full support.

@derrabus derrabus requested a review from dunglas as a code owner Jul 18, 2022
@carsonbot carsonbot added this to the 4.4 milestone Jul 18, 2022
@carsonbot carsonbot changed the title Make sure nested composite types do not crash ReflectionExtractor [PropertyInfo] Make sure nested composite types do not crash ReflectionExtractor Jul 18, 2022
@derrabus derrabus mentioned this pull request Jul 18, 2022
29 tasks
stof
stof approved these changes Jul 18, 2022
@derrabus derrabus merged commit ab1a02f into symfony:4.4 Jul 18, 2022
8 of 10 checks passed
@derrabus derrabus deleted the bugfix/nested-composite-types branch Jul 18, 2022
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.

None yet

4 participants