Skip to content

php 8.6 compatibility - #237

Merged
falkenhawk merged 9 commits into
masterfrom
php86-compat
Nov 4, 2026
Merged

falkenhawk merged 9 commits into
masterfrom
php86-compat

Conversation

@falkenhawk

@falkenhawk falkenhawk commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Fixes for php 8.6 compatibility. All changes are backward-compatible with php 7.1+.

1) php 8.6 deprecations

  • replace is_integer() → is_int(), is_double() → is_float() across 26 files
  • replace spl_object_hash() in zend-navigation, zend-amf, zend-pdf - on php 8.6+ the same 32-char value is built from spl_object_id() (identical output since php 8.1), older versions keep calling spl_object_hash(), so return values of Zend_Navigation_Page::hashCode() and keys of extractFonts() don't change
  • remove return values from Zend_Db_Adapter_Pdo_Sqlite::__construct(), Zend_Server_Reflection_Node::__construct() and Zend_Service_LiveDocx::__destruct()
  • [zend-ldap] sort entry attributes with SORT_STRING instead of SORT_LOCALE_STRING - same order under the default C locale

2) leaked error handlers hiding deprecations

a chain of error handlers that were never restored silently swallowed every error from Zend_View_Helper_HeadMetaTest onward (rest of zend-view, zend-wildfire, zend-xmlrpc) - on every php version, CI included

  • [zend-config] Zend_Config_Xml left its error handler installed when loading failed (invalid file, or XML rejected by Zend_Xml_Security) - this also affected applications catching that exception
  • restore error handlers in HeadMetaTest, XmlRpc_ResponseTest and EmailAddressTest

deprecations uncovered by this (php 8.1/8.2):

  • [zend-xmlrpc] key()/current() called on SimpleXMLElement in Zend_XmlRpc_Value
  • [zend-wildfire] null passed to preg_match_all() when used with Zend_Controller_Request_HttpTestCase
  • dynamic properties in WildfireTest fixtures

3) CI

  • add php 8.6 to CI matrix
  • bump zf1s/phpunit to 3.7.45

Assisted by Claude (Opus 5.5, xhigh).

@falkenhawk
falkenhawk merged commit aeda4b1 into master Nov 4, 2026
12 checks passed
@falkenhawk
falkenhawk deleted the php86-compat branch November 4, 2026 14:19
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.

1 participant