wp-media / imagify-plugin

Speed up your website with lighter images without losing quality.
https://imagify.io
71 stars 25 forks source link

PHP Deprecated notice on PHP 8.2 #767

Closed ionikol closed 8 months ago

ionikol commented 9 months ago

Describe the bug The user on this ticket received the following PHP Deprecated notice when upgraded to PHP 8.2

Deprecated: Creation of dynamic property Imagify\Job\MediaOptimization::$query_url is deprecated in /var/www/uat-innovationmutuelle/wp-content/plugins/imagify/inc/classes/class-imagify-abstract-background-process.php on line 38

Expected behavior No deprecated notice

Acceptance Criteria (for WP Media team use only) Clear instructions for developers, to be added before the grooming

Tabrisrp commented 8 months ago

This is the same issue as https://github.com/wp-media/imagify-plugin/issues/723, which has been merged in 2.1.2.

I'm also not able to replicate the issue on a test site with PHP 8.2, there is no notice for me.

Miraeld commented 8 months ago

I am not able to reproduce it either. And while looking at the involved class, it shouldn't happen. The involved property is being declared here: https://github.com/wp-media/imagify-plugin/blob/1442452affd32be5e7aaebb31611d211fe4a405a/inc/classes/class-imagify-abstract-background-process.php#L26 Which was introduced to avoid this deprecated message.

wordpressfan commented 8 months ago

Totally agree, but the thing is, the issue @Tabrisrp mentioned is shipped with version 2.1.2 here: https://github.com/wp-media/imagify-plugin/releases/tag/v2.1.2

and the customer confirmed that he uses the latest version 2.1.3 and I confirmed that they use it (I checked their site's public plugin readme file https://www.XXX.XXX/wp-content/plugins/imagify/readme.txt)

I asked @ionikol to ask for credentials to check it there.

MathieuLamiot commented 8 months ago

Blocking the issue while we wait for more information from the customer, as it seems a false positive now. @piotrbak 2.1.3.1 has been released as this was the only blocking ticket: https://wp-media.slack.com/archives/CU0F6EGQ1/p1704298484043669

ionikol commented 8 months ago

We have an update from the user here as after their update on Imagify v2.1.3.1 they are not able to reproduce that error anymore.