Skip to content

PHP 8.2 | Fix for partially supported callback - #44537

Merged
Mamaduka merged 1 commit into
trunkfrom
php-8.2/fix-deprecated-callable
Sep 30, 2022
Merged

Mamaduka merged 1 commit into
trunkfrom
php-8.2/fix-deprecated-callable

Conversation

@jrfnl

@jrfnl jrfnl commented Sep 28, 2022 •

Copy link
Copy Markdown
Member

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

jrfnl commented Sep 28, 2022

Copy link
Copy Markdown
Member Author

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

@aristath aristath left a comment

Copy link
Copy Markdown
Member

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