From 8b15da7f661cd92b598dfe6185a467610e9a0dad Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Wed, 9 Jul 2025 10:26:58 +0200 Subject: [PATCH 1/2] [3.0] Use PCOV to avoid segfault with Xdebug 3.4.2 on PHP 8.0+ Builds on #223, #222, #218, and bases on https://github .com/reactphp/async/pull/92 . --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 327ed81..3c98e19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - coverage: xdebug + coverage: ${{ matrix.php < 8.0 && 'xdebug' || 'pcov' }} ini-file: development - run: composer install - run: vendor/bin/phpunit --coverage-text @@ -42,7 +42,7 @@ jobs: - uses: shivammathur/setup-php@v2 with: php-version: 8.2 - coverage: xdebug + coverage: pcov ini-file: development - run: composer install - run: vendor/bin/phpunit --coverage-text From ea774484a29d00428547ff8d75451a5be95ba8b2 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Wed, 9 Jul 2025 13:36:37 +0200 Subject: [PATCH 2/2] [3.0] Downgrade Ubuntu runners to 22.04 Running the test suite on PHP 8+ results in the following two errors on Ubuntu 24.04. This PR doesn't aim to fix those errors, but to ensure we have a working CI test environment. ``` There were 2 failures: 1) React\Tests\Dns\Query\TcpTransportExecutorTest::testQueryStaysPendingWhenClientCanNotSendExcessiveMessageInOneChunkWhenServerClosesSocket React\EventLoop\LoopInterface::removeWriteStream(resource(545) of type (stream)) was not expected to be called. /home/runner/work/dns/dns/src/Query/TcpTransportExecutor.php:273 /home/runner/work/dns/dns/tests/Query/TcpTransportExecutorTest.php:347 2) React\Tests\Dns\Query\TcpTransportExecutorTest::testQueryRejectsWhenClientKeepsSendingWhenServerClosesSocketWithoutCallingCustomErrorHandler Failed asserting that exception of type "Error" matches expected exception "RuntimeException". Message was: "Can only throw objects" at /home/runner/work/dns/dns/tests/Query/TcpTransportExecutorTest.php:413 ``` --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c98e19..886975a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: jobs: PHPUnit: name: PHPUnit (PHP ${{ matrix.php }}) - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 strategy: matrix: php: