Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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:19
@WyriHaximus WyriHaximus added this to the v1.14.0 milestone Aug 13, 2025
@WyriHaximus
Copy link
Member

WyriHaximus commented Aug 26, 2025

@W0rma Just filed #239 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 8998939 to 7dc1637 Compare October 19, 2025 19:11
@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

@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 #239 and #240 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 clue/framework-x#282).

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 57a623a into reactphp:1.x Oct 19, 2025
46 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants