LiteSpeed Cache on PHP 8.6: deprecation notices and the fix
On PHP 8.6 (due 19 November 2026), LiteSpeed Cache 7.9.2 logs deprecation notices when the affected code runs. We found 1 place in its code that PHP 8.6 flags. Nothing stops working; the notices go to your PHP error log and show on pages where errors are displayed.
Tested on 28 October 2026 with the official PHP 8.6.0RC4 build and WordPress 7.1.1, plugin version 7.9.2 (7,000,000+ active installs) from WordPress.org, activated alone with default settings.
The messages you will see
Deprecated: Function spl_object_hash() is deprecated since 8.6, consider using spl_object_id() instead
Where they come from
| File:line | What | When PHP 8.6 complains | In our WordPress test |
|---|---|---|---|
src/cloud-auth-callback.trait.php:396 | calls spl_object_hash()$request_key = spl_object_hash( $request ) . ':' . hash( 'sha256', $action ); | When this code runs | not on the pages we opened |
The fix
Site owners: you don't need to change anything to keep the site working. Keep display_errors off on the live
site, and update LiteSpeed Cache when a release mentions PHP 8.6. If a notice shows on your pages, set
define( 'WP_DEBUG_DISPLAY', false ); in wp-config.php.
Plugin developers, line by line:
- calls
spl_object_hash(): Usespl_object_id(), or update the bundled library that calls it.
What a PHP 8.6 deprecation notice does, and what it doesn't
- Nothing stops working on PHP 8.6. A deprecation is a warning that the code will break in a future major version (PHP 9, no date yet). The plugin keeps working.
- It lands in your logs. With
log_errorson (the usual hosting default) every notice goes to the PHP error log, and withWP_DEBUG_LOGtowp-content/debug.log. - It can show on the page. If
display_errorsis on, orWP_DEBUGis on withoutWP_DEBUG_DISPLAYset to false, the notice is printed into the page. That breaks AJAX/JSON responses and can cause "headers already sent" warnings. Keep display off on live sites. - Compile-time notices are logged when PHP compiles the file. With OPcache that happens once after a restart or
cache reset, so you see a few lines, not one per visit. Function notices (
spl_object_hash(),is_integer()โฆ) are logged every time that code runs.
All 39 affected plugins out of the 100 most popular, and the 61 with no findings: PHP 8.6 and WordPress plugins.
Sources
- PHP 8.6 release schedule (GA 19 November 2026)
- php-src PHP-8.6 UPGRADING, section 4: Deprecated functionality
- RFC: Deprecations for PHP 8.6
- RFC: Deprecate returning a value from __construct()
- php.net pre-release builds (8.6.0RC4 used for this test)
- guzzlehttp/promises 2.6.0 / 3.1.0 changelog: Is deprecated, State added (18 October 2026)
- WordPress.org: popular plugins