Skip to content

[DependencyInjection] Support PHP 8 builtin types in CheckTypeDeclarationsPass #39747

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, 2021

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Jan 7, 2021

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

CheckTypeDeclarationsPass currently explodes if it encounters one of following the new builtin types of PHP 8:

  • false (can only appear as part of a union)
  • mixed (we don't need to check anything)

In either case, the pass will try to call a function is_false()/is_mixed() and fail.

This PR should fix both cases.

@derrabus derrabus force-pushed the bugfix/php-8-builtins branch from 284206b to f16230b Compare January 7, 2021 02:15
@nicolas-grekas
Copy link
Member

Thank you @derrabus.

@nicolas-grekas nicolas-grekas merged commit 3ee310f into symfony:4.4 Jan 7, 2021
@derrabus derrabus deleted the bugfix/php-8-builtins branch January 7, 2021 15:16
This was referenced Jan 27, 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