Improve PHP 8.2+ compatibility by avoiding leftover dynamic properties#44
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Removes a leftover dynamic-property assignment in CompositeConnection::close() to ensure PHP 8.2+ compatibility (dynamic properties are deprecated since 8.2), and raises error_reporting to -1 in both PHPUnit configs so similar issues surface in tests. Also bumps the clue/socks-react dependency to ^1.5, which presumably contains the analogous fix.
Changes:
- Drop the
$this->remote = null;assignment inCompositeConnection::close()(the property was never declared). - Set
error_reporting=-1inphpunit.xml.distandphpunit.xml.legacyto catch deprecations during tests. - Bump
clue/socks-reactconstraint from^1.4to^1.5.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Io/CompositeConnection.php | Removes leftover dynamic property assignment to $this->remote in close(). |
| phpunit.xml.dist | Enables full error reporting during tests. |
| phpunit.xml.legacy | Enables full error reporting during tests (legacy PHPUnit schema). |
| composer.json | Bumps clue/socks-react to ^1.5. |
💡 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.2+ compatibility by avoiding leftover dynamic properties. This is really only a leftover that wasn't spotted before, so increasing error reporting for our tests to avoid similar problems looking forward.
Builds on top of #42, #37 and clue/reactphp-socks#118
Refs #40