Repository navigation
php 8.5 compatibility - #225
Merged
Merged
Conversation
php 8.5 added a new $uriParserClass parameter to __doRequest(). Without it, child classes trigger a fatal error during class loading.
(boolean) -> (bool), (integer) -> (int), (double) -> (float) applied with php-cs-fixer short_scalar_cast rule
xml_parser_free() and imagedestroy() are no-ops since php 8.0, deprecated in php 8.5. Skip on php 8.0+ where they have no effect.
no-op since php 8.1 (all properties accessible via reflection), deprecated in php 8.5.
SplObjectStorage::contains() -> offsetExists() SplObjectStorage::attach() -> offsetSet() both deprecated in php 8.5. Replacements available since php 5.1.
…ze() php 8.5 expects return type array on __serialize().
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY deprecated in php 8.5 in favor of the driver-specific Pdo\Mysql::ATTR_USE_BUFFERED_QUERY constant. Test-only change.
case followed by semicolon is deprecated in php 8.5. Applied with php-cs-fixer switch_case_semicolon_to_colon rule.
falkenhawk
force-pushed
the
php85-compat
branch
2 times, most recently
from
April 3, 2026 13:52
8a92012 to
831f2ce
Compare
- [zend-translate] cast $originate to string when used as array key (null as array offset is deprecated in php 8.5) - [zend-codegenerator] cast to array before passing to RecursiveArrayIterator (using object as backing array is deprecated in php 8.5)
…meSync coalesce to usage site
…sion for php 8.5 The old code mutated iterator values via offsetSet during traversal, replacing arrays with DefaultValue objects. When the iterator then tried to descend into those replaced values, RecursiveArrayIterator called new ArrayIterator($object) - deprecated in php 8.5. On older PHP this silently yielded no children (protected properties aren't iterable), so only the top-level array was ever processed by the iterator; nested arrays were handled later by recursive generate() calls. The new _prepareArrayValue() does the same thing explicitly.
pool.ntp.org is unreachable from GitHub Actions runners. Try time.windows.com first (confirmed working on CI), fall back to pool.ntp.org, only mark incomplete if both fail.
php 8.5: fix deprecation of null as array key
php 8.5: fix remaining deprecations
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PHP 8.5 compatibility fixes. All changes are backward-compatible with PHP 7.1+ (why 7.1+? see #218).
non-canonical casts and syntax
(boolean)→(bool),(integer)→(int),(double)→(float)across 51 filesSoapClient::__doRequest()signature for new$uriParserClassparameter$originateto string when used as array key#226 - guard deprecated functions, methods, and syntax
xml_parser_free()andimagedestroy()withPHP_VERSION_ID < 80000ReflectionProperty::setAccessible()on php 8.1+SplObjectStorage::contains()→offsetExists(),attach()→offsetSet()#[ReturnTypeWillChange]toSplPriorityQueue::__serialize()Pdo\Mysql::ATTR_USE_BUFFERED_QUERYon php 8.5+ (test-only)casestatements across 38 files#227 - null as array offset /
array_key_exists()keyTestCaseTestto provide table name#228 - remaining deprecations
RecursiveArrayIteratorwith simple recursive walk inDefaultValue::generate()#[ReturnTypeWillChange]toSplPriorityQueue::__unserialize()ord()against empty string fromfread()inNtp::_read()xml_parser_free()inZend_Log_Writer_StreamTesttestTimesync-pool.ntp.orgunreachable from GitHub Actions