Skip to content

fix: log the vendor spl_object_hash() deprecation on PHP 8.6 instead of throwing - #10806

Merged
paulbalandan merged 1 commit into
codeigniter4:4.8from
paulbalandan:vendor-deprecation-workaround
Nov 24, 2026
Merged

paulbalandan merged 1 commit into
codeigniter4:4.8from
paulbalandan:vendor-deprecation-workaround

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
mikey179/vfsstream and kint-php/kint call spl_object_hash(), which PHP 8.6 deprecates. vfsStream has no upstream fix. Kint silences the call with @, but Exceptions::errorHandler() ignores @ for deprecations. So the deprecation is thrown as an ErrorException when logDeprecations is off or CODEIGNITER_SCREAM_DEPRECATIONS is set. Tests that use either package then fail on 8.6, such as FileMovingTest, FilesystemHelperTest and ConfigCheckTest.

errorHandler() now logs that deprecation instead of throwing when it comes from a file under mikey179/vfsstream or kint-php/kint. Other spl_object_hash() deprecations still throw.

The check shares a branch with the PHP 8.4 session-sid check, and both now go through handleDeprecationError(). So the session-sid deprecations are logged at deprecationLogLevel with a backtrace, instead of at warning without one.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@carson-codeigniter4 carson-codeigniter4 Bot added 4.8 PRs that target the `4.8` branch. bug Verified issues on the current code behavior or pull requests that will fix them labels Nov 20, 2026

@ddevsr ddevsr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make TODO for remove Kint soon

kint-php/kint@5fba56b

Comment thread system/Debug/Exceptions.php Resolved
@paulbalandan
paulbalandan force-pushed the vendor-deprecation-workaround branch from 137afeb to d431443 Compare November 23, 2026 17:15
Comment thread docs/changelogs/v4.8.0.md Resolved
@paulbalandan
paulbalandan force-pushed the vendor-deprecation-workaround branch from d431443 to 742e56c Compare November 24, 2026 11:44
@carson-codeigniter4 carson-codeigniter4 Bot added the stale Pull requests with conflicts label Nov 24, 2026
@carson-codeigniter4

This comment has been minimized.

@paulbalandan
paulbalandan force-pushed the vendor-deprecation-workaround branch from 742e56c to 6c5938e Compare November 24, 2026 16:11
@carson-codeigniter4 carson-codeigniter4 Bot removed the stale Pull requests with conflicts label Nov 24, 2026
@paulbalandan
paulbalandan merged commit 4f6ca9a into codeigniter4:4.8 Nov 24, 2026
50 checks passed
@paulbalandan
paulbalandan deleted the vendor-deprecation-workaround branch November 24, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.8 PRs that target the `4.8` branch. bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants