From 72181366be7e70beab4133380530d3932b69db8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Sun, 11 Jan 2026 23:45:28 +0100 Subject: [PATCH] Run tests on PHP 8.5 and update test environment --- .github/workflows/ci.yml | 5 +++-- composer.json | 6 +++--- tests/FactoryTest.php | 4 +++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8555965..5abb9aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,12 +7,13 @@ on: jobs: PHPUnit: name: PHPUnit (PHP ${{ matrix.php }}) - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 env: LOGIN: username:password@localhost strategy: matrix: php: + - 8.5 - 8.4 - 8.3 - 8.2 @@ -28,7 +29,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 }} diff --git a/composer.json b/composer.json index 75a3141..f7d68fc 100644 --- a/composer.json +++ b/composer.json @@ -13,9 +13,9 @@ "require": { "php": ">=5.3", "evenement/evenement": "^3.0 || ^2.0 || ^1.0", - "react/event-loop": "^1.2", - "react/promise": "^3.2 || ^2.9 || ^1.1", - "react/socket": "^1.16" + "react/event-loop": "^1.6", + "react/promise": "^3.3 || ^2.9 || ^1.1", + "react/socket": "^1.17" }, "require-dev": { "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", diff --git a/tests/FactoryTest.php b/tests/FactoryTest.php index 607c899..b59c188 100644 --- a/tests/FactoryTest.php +++ b/tests/FactoryTest.php @@ -25,7 +25,9 @@ public function testDefaultCtorCreatesConnectorAutomatically() $this->factory = new Factory(); $ref = new \ReflectionProperty($this->factory, 'connector'); - $ref->setAccessible(true); + if (PHP_VERSION_ID < 80100) { + $ref->setAccessible(true); + } $connector = $ref->getValue($this->factory); $this->assertInstanceOf('React\Socket\Connector', $connector);