From c039ddf4018dd6ad15347d7e60ad4ae8464fdd2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Sat, 21 Feb 2026 19:26:18 +0100 Subject: [PATCH] Run tests on PHP 8.5 and update test environment --- .github/workflows/ci.yml | 5 +++-- composer.json | 6 +++--- tests/ConnectionManagerDelayTest.php | 4 +++- tests/ConnectionManagerTimeoutTest.php | 4 +++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28d97cb..1085c52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ jobs: strategy: matrix: php: + - 8.5 - 8.4 - 8.3 - 8.2 @@ -26,7 +27,7 @@ jobs: - 5.4 - 5.3 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} @@ -39,7 +40,7 @@ jobs: runs-on: ubuntu-24.04 continue-on-error: true steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM - name: Run hhvm composer.phar require react/promise:^2 # downgrade Promise for HHVM uses: docker://hhvm/hhvm:3.30-lts-latest diff --git a/composer.json b/composer.json index d141d87..c2e9ba9 100644 --- a/composer.json +++ b/composer.json @@ -12,10 +12,10 @@ ], "require": { "php": ">=5.3", - "react/event-loop": "^1.2", - "react/promise": "^3.2 || ^2.1 || ^1.2.1", + "react/event-loop": "^1.6", + "react/promise": "^3.3 || ^2.1 || ^1.2.1", "react/promise-timer": "^1.11", - "react/socket": "^1.16" + "react/socket": "^1.17" }, "require-dev": { "phpunit/phpunit": "^9.6 || ^8.5 || ^5.7 || ^4.8.36" diff --git a/tests/ConnectionManagerDelayTest.php b/tests/ConnectionManagerDelayTest.php index b84d9e1..5ace72f 100644 --- a/tests/ConnectionManagerDelayTest.php +++ b/tests/ConnectionManagerDelayTest.php @@ -23,7 +23,9 @@ public function testConstructWithoutLoopAssignsLoopAutomatically() $cm = new ConnectionManagerDelay($unused, 0); $ref = new \ReflectionProperty($cm, 'loop'); - $ref->setAccessible(true); + if (PHP_VERSION_ID < 80100) { + $ref->setAccessible(true); + } $loop = $ref->getValue($cm); $this->assertInstanceOf('React\EventLoop\LoopInterface', $loop); diff --git a/tests/ConnectionManagerTimeoutTest.php b/tests/ConnectionManagerTimeoutTest.php index 816fee0..3e5842f 100644 --- a/tests/ConnectionManagerTimeoutTest.php +++ b/tests/ConnectionManagerTimeoutTest.php @@ -25,7 +25,9 @@ public function testConstructWithoutLoopAssignsLoopAutomatically() $cm = new ConnectionManagerTimeout($unused, 0); $ref = new \ReflectionProperty($cm, 'loop'); - $ref->setAccessible(true); + if (PHP_VERSION_ID < 80100) { + $ref->setAccessible(true); + } $loop = $ref->getValue($cm); $this->assertInstanceOf('React\EventLoop\LoopInterface', $loop);