Skip to content

fix: PHP 8.5 deprecation for null as array offset#2032

Merged
DerManoMann merged 1 commit into
zircote:masterfrom
DerManoMann:fix/php-8.5-null-array-offset-deprecation
Jun 29, 2026
Merged

fix: PHP 8.5 deprecation for null as array offset#2032
DerManoMann merged 1 commit into
zircote:masterfrom
DerManoMann:fix/php-8.5-null-array-offset-deprecation

Conversation

@DerManoMann

@DerManoMann DerManoMann commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix PHP 8.5 "Using null as an array offset" deprecation warnings
  • Use ?? Generator::UNDEFINED pattern for null-safe key-field checks in AbstractAnnotation
  • Guard against null parameter/name in AugmentParameters
  • Skip tags with empty name in AugmentTags
  • Add tests that reproduce the deprecation on unpatched code

Improves and supersedes #2004 from @hotrush

Test plan

  • New tests trigger deprecation on old code, pass on fixed code
  • All 1043 tests pass

Use null-coalescing with Generator::UNDEFINED to guard against null
key-field values in serialization and validation. Adds tests that
trigger the deprecation on unpatched code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@DerManoMann DerManoMann force-pushed the fix/php-8.5-null-array-offset-deprecation branch from 3783548 to 5d949d9 Compare June 29, 2026 05:51
@DerManoMann DerManoMann merged commit 0a50a64 into zircote:master Jun 29, 2026
17 checks passed
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