Improve PHP 8.5+ support by avoiding deprecated setAccessible() calls#67
Merged
Improve PHP 8.5+ support by avoiding deprecated setAccessible() calls#67
setAccessible() calls#67Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to improve compatibility with newer PHP versions (PHP 8.5+) by avoiding deprecated ReflectionProperty::setAccessible() calls, and updates dependencies/CI accordingly.
Changes:
- Guard
ReflectionProperty::setAccessible(true)calls behind aPHP_VERSION_ID < 80100check in both production code and tests. - Bump ReactPHP package constraints (
react/promise,react/socket,react/event-loop) presumably to pick up upstream compatibility fixes. - Update CI to include PHP 8.5 and change
actions/checkoutmajor version.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/ProxyConnectorTest.php |
Avoids calling deprecated setAccessible() on PHP ≥ 8.1 in the test suite. |
src/ProxyConnector.php |
Avoids calling deprecated setAccessible() on PHP ≥ 8.1 when sanitizing exception traces. |
composer.json |
Updates ReactPHP dependency constraints to newer versions. |
.github/workflows/ci.yml |
Expands PHP test matrix (adds 8.5) and changes checkout action major version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changeset improves PHP 8.5+ support by avoiding the deprecated
setAccessible()call as discussed in clue/framework-x#297.Builds on top of #66, reactphp/socket#325, reactphp/promise#264, reactphp/event-loop#282, and clue/framework-x#297