Skip to content

fix: Replace SplObjectStorage PHP 8.5 deprecated methods - #56

Merged
antten merged 1 commit into
masterfrom
fix/replace_splobjectstorage_deprecated_methods
Aug 11, 2026
Merged

antten merged 1 commit into
masterfrom
fix/replace_splobjectstorage_deprecated_methods

Conversation

@antten

@antten antten commented Aug 10, 2026

Copy link
Copy Markdown

❓ Why?

In PHP 8.5, the methods attach() and detach() on SplObjectStorage are deprecated. Since SplObjectStorage implements the ArrayAccess interface, we can easily replace these methods using array syntax instead.

🚀 This PR updates our code to avoid deprecation warnings in PHP 8.5+.

@antten
antten marked this pull request as ready for review August 10, 2026 09:10

@Oliboy50 Oliboy50 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.

even though the docs suggest to switch from attach/detach to offsetSet/offsetUnset, this PR changes seem to be identical (because $throwable cannot be null)

👏

@antten
antten force-pushed the fix/replace_splobjectstorage_deprecated_methods branch from cacc782 to 7541e66 Compare August 11, 2026 13:01
@antten
antten merged commit 4d47e23 into master Aug 11, 2026
5 checks passed
@antten
antten deleted the fix/replace_splobjectstorage_deprecated_methods branch August 11, 2026 13:12
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.

3 participants