Skip to content

PHP 8.2: Fix Creation of dynamic property deprecation notices#153

Closed
philipjohn wants to merge 4 commits into
Automattic:masterfrom
philipjohn:fix/php-8.2-deprecated
Closed

PHP 8.2: Fix Creation of dynamic property deprecation notices#153
philipjohn wants to merge 4 commits into
Automattic:masterfrom
philipjohn:fix/php-8.2-deprecated

Conversation

@philipjohn
Copy link
Copy Markdown

@philipjohn philipjohn commented Oct 30, 2023

In PHP 8.2, dynamically setting object properties that haven't been defined has been deprecated. WP_Object_Cache does this in several places, leading to a number of these notices.

The solution is simple - we simply need to define those properties in the class.

@davidwren-boxuk
Copy link
Copy Markdown

Would be great to see this merged if possible to reduce a lot of chatter in the logs!

@Krinkle
Copy link
Copy Markdown

Krinkle commented Apr 21, 2024

A different PR that fixes the same issue has since been merged: #149

@dd32
Copy link
Copy Markdown
Member

dd32 commented Jun 20, 2024

Thanks for the PR @philipjohn, I apologise for the delay in feedback. It looks like these changes were merged in #149 and will be included in the 4.1 release via #162

@dd32 dd32 closed this Jun 20, 2024
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.

4 participants