Skip to content

PHP 8.6 compatibility - #174

Merged
sorinsarca merged 1 commit into
opis:masterfrom
dhrupo:php86-spl-object-id
Nov 6, 2026
Merged

sorinsarca merged 1 commit into
opis:masterfrom
dhrupo:php86-spl-object-id

Conversation

@dhrupo

@dhrupo dhrupo commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Ensures PHP 8.6 compatibility by replacing the spl_object_hash() call in SchemaLoader::createSchemaId(). PHP 8.6 deprecates spl_object_hash(), so every object schema loaded without an $id triggers a deprecation (2216 in the test suite on 8.6.0-dev).

The id is now built from spl_object_id() in the same 32-character form, which is exactly what spl_object_hash() returns since PHP 8.1, so generated ids do not change there.

Adds 8.6 to the CI matrix. The test suite passes on 7.4, 8.5 and 8.6.0-dev with no deprecations (2216 on 8.6 before).

AI assistance: I used Claude Code to find this and write the change; I reviewed and ran everything myself.

@sorinsarca sorinsarca left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@dhrupo Please check the comments from the review

Comment thread tests/SchemaLoaderTest.php Resolved
Comment thread phpunit.xml Resolved
spl_object_hash() is deprecated in PHP 8.6. Build the generated schema id from spl_object_id() in the same format spl_object_hash() returns since PHP 8.1, so ids stay the same there. Add PHP 8.6 to the CI matrix.
@dhrupo
dhrupo force-pushed the php86-spl-object-id branch from 81045f7 to 77a249f Compare November 6, 2026 06:52
@sorinsarca
sorinsarca merged commit 38a6ff0 into opis:master Nov 6, 2026
8 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.

2 participants