Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[1.x] Improve PHP 8.5+ support by avoiding deprecated setAccessible() calls #325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
WyriHaximus merged 1 commit into reactphp:1.x from W0rma:reflection-set-accessible
Oct 19, 2025

Conversation

@W0rma
Copy link
Contributor

@W0rma W0rma commented Aug 2, 2025

As of PHP 8.1.0, calling this method has no effect; all methods are invokable by default.

(https://www.php.net/manual/en/reflectionmethod.setaccessible.php and https://www.php.net/manual/en/reflectionproperty.setaccessible.php).

There're even plans to deprecate the method in PHP 8.5: https://wiki.php.net/rfc/deprecations_php_8_5#extreflection_deprecations

@W0rma W0rma marked this pull request as ready for review August 2, 2025 08:29
@WyriHaximus WyriHaximus added this to the v1.17.0 milestone Aug 13, 2025
Copy link
Member

@W0rma Just filed #326 to solve the macos failure, can you rebase your PR once that PR has been merged?

@clue clue force-pushed the reflection-set-accessible branch from ac09dff to 68965d2 Compare October 19, 2025 20:08
Copy link
Member

@clue clue left a comment

Choose a reason for hiding this comment

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

@W0rma Thanks for the updates, changes LGTM! :shipit:

I've rebased your PR on current 1.x, all unrelated build errors have been fixed with #326 in the meantime, so time to move on finally! With these changes applied, tests against the current PHP 8.5 RC pass without errors (refs reactphp/dns#238 and clue/framework-x#282).

@clue clue changed the title (削除) [1.x] Do not call Reflection*::setAccessible() in PHP >= 8.1 (削除ここまで) (追記) [1.x] Improve PHP 8.5+ support by avoiding deprecated setAccessible() calls (追記ここまで) Oct 19, 2025
Copy link
Member

@WyriHaximus WyriHaximus left a comment

Choose a reason for hiding this comment

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

👍

@WyriHaximus WyriHaximus merged commit def0730 into reactphp:1.x Oct 19, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@WyriHaximus WyriHaximus WyriHaximus approved these changes

@clue clue clue approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

v1.17.0

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /