wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

Update Mobile Detect Library for compatibility with PHP 8.4

Open jeawhanlee opened this issue 5 months ago • 4 comments

Describe the bug Deprecation warnings with 8.4 for Mobile Detect library: WP_Rocket_Mobile_Detect::__construct(): Implicitly marking parameter $headers as nullable is deprecated, the explicit nullable type must be used instead in /var/www/new.rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/classes/dependencies/mobiledetect/mobiledetectlib/Mobile_Detect.php on line 888

To Reproduce Steps to reproduce the behavior:

  1. On env with PHP 8.4
  2. Install and activate WPR <=3.19.1
  3. Check debug.log
  4. See deprecation warning for Mobile Detect library

Expected behavior There should be no deprecation warning in debug.log related to Mobile Detect library

Additional context Fix here was removed since it looked more complex and was a blocker

jeawhanlee avatar Jul 14 '25 09:07 jeawhanlee

Ticket: https://secure.helpscout.net/conversation/3062784612/584577

camilamadronero avatar Sep 08 '25 13:09 camilamadronero

Related: https://secure.helpscout.net/conversation/3138577674/599851

joejoe04 avatar Nov 13 '25 15:11 joejoe04

Related: https://secure.helpscout.net/conversation/3163743315/607089?viewId=273761

johan-las avatar Dec 09 '25 09:12 johan-las

Has there been any progress on this? Checking the linked PR, it just seems like it was closed with no further discussion?

JshGrn avatar Dec 09 '25 20:12 JshGrn