Skip to content

Improve PHP 8.5+ support by avoiding deprecated setAccessible() calls#124

Merged
clue merged 1 commit intoclue:1.xfrom
clue-labs:php8.5
Apr 13, 2026
Merged

Improve PHP 8.5+ support by avoiding deprecated setAccessible() calls#124
clue merged 1 commit intoclue:1.xfrom
clue-labs:php8.5

Conversation

@clue
Copy link
Copy Markdown
Owner

@clue clue commented Apr 13, 2026

This changeset improves PHP 8.5+ support by avoiding the deprecated setAccessible() call as discussed in clue/framework-x#297.

Builds on top of #123, #122, reactphp/socket#325, reactphp/promise#264, reactphp/event-loop#282, and clue/framework-x#297

@clue clue added this to the v1.5.0 milestone Apr 13, 2026
@clue clue added the new feature New feature or request label Apr 13, 2026
@clue clue requested a review from Copilot April 13, 2026 11:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to improve compatibility with newer PHP versions (PHP 8.5+) by avoiding deprecated ReflectionProperty::setAccessible() calls while keeping behavior compatible with older PHP versions.

Changes:

  • Guard ReflectionProperty::setAccessible(true) behind a PHP_VERSION_ID < 80100 check in tests and runtime code paths.
  • Bump ReactPHP dependency constraints (react/promise, react/socket) and dev dependency (react/event-loop) to newer versions.
  • Update CI to run on ubuntu-24.04, add PHP 8.5 to the test matrix, and update actions/checkout major version.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/ServerTest.php Conditionally avoids calling deprecated setAccessible() when reading private $loop via reflection.
tests/ClientTest.php Conditionally avoids calling deprecated setAccessible() when reading private $connector via reflection.
src/Client.php Conditionally avoids calling deprecated setAccessible() when reflecting on Exception::$trace.
composer.json Updates ReactPHP dependency constraints to newer compatible releases.
.github/workflows/ci.yml Updates CI runner, adds PHP 8.5, and bumps checkout action major version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@clue clue merged commit edd1c2d into clue:1.x Apr 13, 2026
20 checks passed
@clue clue deleted the php8.5 branch April 13, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants