Skip to content

fix: compatibility with PHP 8.2#5024

Merged
soyuka merged 2 commits into
api-platform:3.0from
dunglas:fix/php8.2-compat
Sep 29, 2022
Merged

fix: compatibility with PHP 8.2#5024
soyuka merged 2 commits into
api-platform:3.0from
dunglas:fix/php8.2-compat

Conversation

@dunglas

@dunglas dunglas commented Sep 28, 2022

Copy link
Copy Markdown
Member
Q A
Branch? 3.0
Tickets n/a
License MIT
Doc PR n/a

Prevents this error:

Compile Error: Type Traversable|object|array|null contains both object and a class type, which is redundant

Related to php/php-src#9556.
Please note that as described in this issue, this change isn't a BC break and doesn't break existing code even on PHP 8.1.

@soyuka
soyuka merged commit f40d57a into api-platform:3.0 Sep 29, 2022

@vincentchalamon vincentchalamon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, just wonder if changing the return-type of the ProviderInterface doesn't introduce a BC break...

@dunglas
dunglas deleted the fix/php8.2-compat branch September 29, 2022 09:57
@dunglas

dunglas commented Sep 29, 2022

Copy link
Copy Markdown
Member Author

LGTM, just wonder if changing the return-type of the ProviderInterface doesn't introduce a BC break...

No, it doesn't: php/php-src#9556 (comment)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants