Skip to content

Improve PHP 8.6+ support by avoiding spl_object_hash() in tests - #313

Merged
clue merged 1 commit into
clue:mainfrom
clue-labs:php8.6
Oct 24, 2026
Merged

clue merged 1 commit into
clue:mainfrom
clue-labs:php8.6

Conversation

@clue

@clue clue commented Oct 24, 2026

Copy link
Copy Markdown
Owner

This changeset improves PHP 8.6+ support by avoiding the deprecated spl_object_hash() function in tests. The suggested spl_object_id() requires PHP 7.2+, so the test now compares the container instance directly to keep supporting PHP 7.1. With these changes applied, tests against the current PHP 8.6 RC pass without errors.

Builds on top of #290, #282, #297 and others
Refs https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_spl_object_hash and php/php-src#23074

@clue clue added the new feature New feature or request label Oct 24, 2026
@clue clue added this to the v0.18.0 milestone Oct 24, 2026
@clue
clue requested a balanced review from Copilot October 24, 2026 21:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused test-only change preserves the identity assertion without introducing newer PHP APIs or affecting production behavior.

No open issues 🎉

What changed in this PR

Updates the container identity test to avoid deprecated spl_object_hash() calls on PHP 8.6+ while retaining PHP 7.1 compatibility.

Changes:

  • Compares the injected container directly with the original instance using strict identity.
  • Updates the expected JSON response to reflect the boolean result without changing production code.
File Description
tests/​ContainerTest.php Replaces object-hash comparisons with a direct container identity check.

Review effort: Balanced

@clue
clue merged commit 40cd23e into clue:main Oct 24, 2026
75 checks passed
@clue
clue deleted the php8.6 branch October 24, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants