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 Deprecated: notices with PHP 8.2.3 #5801

Closed
4 tasks
Mai-Saad opened this issue Mar 8, 2023 · 8 comments · Fixed by #5908
Closed
4 tasks

PHP Deprecated: notices with PHP 8.2.3 #5801

Mai-Saad opened this issue Mar 8, 2023 · 8 comments · Fixed by #5908
Assignees
Labels
priority: low Issues that can wait severity: minor Defect that does not affect functionality type: bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@Mai-Saad
Copy link

Mai-Saad commented Mar 8, 2023

Before submitting an issue please check that you’ve completed the following steps:

  • Made sure you’re on the latest version => 3.12.6.1
  • Used the search feature to ensure that the bug hasn’t been reported before

Describe the bug
PHP Deprecated notice (count 150+) exists in debug.log while site is using PHP 8.2.3
[08-Mar-2023 14:51:05 UTC] PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/new.rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Engine/Optimization/DelayJS/HTML.php on line 253
[08-Mar-2023 14:51:09 UTC] PHP Deprecated: Creation of dynamic property WP_Rocket\Engine\Preload\Database\Rows\CacheRow::$id is deprecated in /var/www/new.rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Dependencies/Database/Base.php on line 266
To Reproduce
Steps to reproduce the behavior:

  1. Website using PHP 8.2.3
  2. Install and activate WPR
  3. check debug.log

Expected behavior
no deprecated notice in debug.log

Additional context
Add any other context about the problem here.

  • This doesn't exist with PHP 8.1.14

Backlog Grooming (for WP Media dev team use only)

  • Reproduce the problem
  • Identify the root cause
  • Scope a solution
  • Estimate the effort
@Mai-Saad Mai-Saad added type: bug Indicates an unexpected problem or unintended behavior priority: low Issues that can wait severity: minor Defect that does not affect functionality labels Mar 8, 2023
@Mai-Saad Mai-Saad changed the title PHP Deprecated: with PHP 8.2.3 PHP Deprecated: notice with PHP 8.2.3 Mar 8, 2023
@Mai-Saad Mai-Saad changed the title PHP Deprecated: notice with PHP 8.2.3 PHP Deprecated: notices with PHP 8.2.3 Mar 8, 2023
@piotrbak
Copy link
Contributor

@Mai-Saad Did you enable all WP Rocket's options + performed some operations like clearing the cache, etc.?

It would be good to resolve as many deprecations as possible here.

@Mai-Saad
Copy link
Author

@piotrbak After enable all options and play around with admin bar, the deprecation logs will be 7K + (mostly for preload)
Screenshot from 2023-03-14 08-57-56

@jeawhanlee jeawhanlee self-assigned this Mar 21, 2023
@jeawhanlee
Copy link
Contributor

Opened a PR at berlinDB that should fix this.

@piotrbak piotrbak added this to the 3.13.2 milestone Mar 22, 2023
@vmanthos
Copy link
Contributor

I got the same on a Multisite (8.2.1):

[27-Mar-2023 10:07:52 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /shared/httpd/multisite/htdocs/wp-content/plugins/wp-rocket/inc/Engine/Optimization/DelayJS/HTML.php on line 254
[27-Mar-2023 10:07:52 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /shared/httpd/multisite/htdocs/wp-content/plugins/wp-rocket/inc/Engine/Optimization/DelayJS/HTML.php on line 264
[27-Mar-2023 10:07:52 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /shared/httpd/multisite/htdocs/wp-content/plugins/wp-rocket/inc/Engine/Optimization/DelayJS/HTML.php on line 273

There are more occurrences of the ${var} pattern in wp-rocket/inc/Engine/Optimization/DelayJS/HTML.php.

@jeawhanlee jeawhanlee mentioned this issue Mar 30, 2023
4 tasks
@piotrbak
Copy link
Contributor

@jeawhanlee In this PR let's update the berlinDB version.

@piotrbak
Copy link
Contributor

@vmanthos Moved your comment to the new issue:
#5862

@piotrbak piotrbak removed this from the 3.13.2 milestone May 5, 2023
@piotrbak
Copy link
Contributor

piotrbak commented May 7, 2023

@jeawhanlee How it's going with this one?

@codemonkeynorth
Copy link

adding in case these have been missed

(Current version of WP Rocket: 3.8.2)

thanks
J


Deprecated: Creation of dynamic property WP_Rocket\Engine\Preload\SitemapPreloadSubscriber::$options is deprecated in /wp-content/plugins/wp-rocket/inc/Engine/Preload/SitemapPreloadSubscriber.php on line 26

Deprecated: Creation of dynamic property WP_Rocket\Engine\Preload\SitemapPreloadSubscriber::$sitemap_preload is deprecated in /wp-content/plugins/wp-rocket/inc/Engine/Preload/SitemapPreloadSubscriber.php on line 27

Deprecated: Automatic conversion of false to array is deprecated in /wp-content/plugins/wp-rocket/inc/3rd-party/plugins/seo/yoast-seo.php on line 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low Issues that can wait severity: minor Defect that does not affect functionality type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants