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

PHP 8.2 | Fix for partially supported callback #44537

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 28, 2022

What?

array( 'self', 'method_name' )-like callbacks are only partially supported by PHP. With this mind, they will be deprecated in PHP 8.2, with support being completely removed in PHP 9.0.

Fixed by changing it to a fully supported syntax.

Refs:

Why?

Because code should be cross-version compatible with all supported PHP versions, including the upcoming PHP 8.2.

`array( 'self', 'method_name' )`-like callbacks are only partially supported by PHP. With this mind, they will be deprecated in PHP 8.2, with support being completely removed in PHP 9.0.

Fixed by changing it to a fully supported syntax.

Refs:
* https://wiki.php.net/rfc/deprecate_partially_supported_callables
@jrfnl jrfnl requested a review from spacedmonkey as a code owner September 28, 2022 17:52
@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Sep 28, 2022
@WordPress WordPress deleted a comment from github-actions bot Sep 28, 2022
@jrfnl jrfnl removed the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Sep 28, 2022
@jrfnl
Copy link
Member Author

jrfnl commented Sep 28, 2022

Loosely related to #44536 which is about a similar issue.

Copy link
Member

@aristath aristath left a comment

Choose a reason for hiding this comment

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

Thank you! Looks good to me 👍

@Mamaduka Mamaduka merged commit 0b30a4c into trunk Sep 30, 2022
@Mamaduka Mamaduka deleted the php-8.2/fix-deprecated-callable branch September 30, 2022 11:49
@github-actions github-actions bot added this to the Gutenberg 14.3 milestone Sep 30, 2022
@anton-vlasenko anton-vlasenko added the [Type] Code Quality Issues or PRs that relate to code quality label Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants