Skip to content

PHP 8.4 and 8.5 compatibility#25

Merged
falkenhawk merged 7 commits intomasterfrom
php85-compat
Apr 2, 2026
Merged

PHP 8.4 and 8.5 compatibility#25
falkenhawk merged 7 commits intomasterfrom
php85-compat

Conversation

@falkenhawk
Copy link
Copy Markdown
Member

@falkenhawk falkenhawk commented Apr 1, 2026

ensure PHP 8.4 and 8.5 compatibility. All changes are backward-compatible with PHP 5.3+.

  1. add PHP 8.4 and 8.5 to CI matrix

  2. fix implicit nullable parameter deprecation on PHP 8.4+ (followup to PHP 8.4: Implicitly nullable parameter declarations deprecated #22) - remove type hints from parameters with = NULL default, add runtime type checks via PHPUnit_Util_InvalidArgumentHelper where applicable. Uses the existing PHPUnit utility class instead of Zf1s\Compat\Types from the linked PR since that package doesn't exist on packagist yet, and for 13 occurrences in a single repo a shared dependency isn't warranted.

  3. replace deprecated SplObjectStorage::attach()/contains() with offsetSet()/offsetExists() (PHP 8.5)

  4. skip deprecated ReflectionProperty::setAccessible() on PHP 8.1+ (no-op since 8.1, deprecated in 8.5)

  5. fix remaining PHP 8.5 deprecations: non-canonical (integer) cast, NAN/INF float-to-int guard in Type::recursiveExport(), recursion depth guard in dataToString() to prevent OOM on self-referencing test data

  6. update actions/checkout v3 to v4 (Node.js 20 deprecation)

Note: PEAR still has (integer) cast and backtick operator deprecations on PHP 8.5 (pear/pear-core#167). These don't currently affect test results but will log deprecation warnings.

@falkenhawk falkenhawk force-pushed the php85-compat branch 2 times, most recently from 155f03f to 98b5f8f Compare April 2, 2026 06:09
Node.js 20 actions are deprecated and will be forced to Node.js 24
starting June 2nd, 2026. actions/checkout@v3 runs on Node.js 20,
v4 supports Node.js 24.
@falkenhawk falkenhawk merged commit 88c58e1 into master Apr 2, 2026
30 checks passed
@falkenhawk falkenhawk deleted the php85-compat branch April 2, 2026 11:40
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