From 2c82e9132d4ee2bfe97be49bf303c905858ca626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Thu, 2 Jan 2025 09:13:56 +0100 Subject: [PATCH] Run tests on PHP 8.4 and update test environment --- .github/workflows/ci.yml | 8 +++++--- tests/FunctionalFactoryTest.php | 2 +- tests/Io/BlockingDatabaseTest.php | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 799bce8..ed065d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,9 +11,11 @@ jobs: strategy: matrix: os: - - ubuntu-22.04 + - ubuntu-24.04 - windows-2022 php: + - 8.4 + - 8.3 - 8.2 - 8.1 - 8.0 @@ -36,8 +38,8 @@ jobs: extensions: sqlite3 coverage: xdebug ini-file: development - # disable JIT on PHP 8.2 with Xdebug: JIT is incompatible with third party extensions that override zend_execute_ex(). JIT disabled. - ini-values: ${{ matrix.php == 8.2 && 'opcache.jit_buffer_size=0' || '' }} + # disable JIT on PHP 8.2+ with Xdebug: JIT is incompatible with third party extensions that override zend_execute_ex(). JIT disabled. + ini-values: ${{ matrix.php >= 8.2 && 'opcache.jit_buffer_size=0' || '' }} - run: composer install - run: vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml if: ${{ matrix.php >= 7.3 }} diff --git a/tests/FunctionalFactoryTest.php b/tests/FunctionalFactoryTest.php index 96ca66a..d754fb5 100644 --- a/tests/FunctionalFactoryTest.php +++ b/tests/FunctionalFactoryTest.php @@ -52,7 +52,7 @@ public function testOpenReturnsPromiseWhichFulfillsWithConnectionForMemoryPathAn public function testOpenReturnsPromiseWhichRejectsWithExceptionWhenPathIsInvalid() { $factory = new Factory(); - $promise = $factory->open('/dev/foobar'); + $promise = $factory->open('/dev/foo/bar'); $promise->then(function (DatabaseInterface $db) { echo 'open.'; diff --git a/tests/Io/BlockingDatabaseTest.php b/tests/Io/BlockingDatabaseTest.php index ac8f50c..296c386 100644 --- a/tests/Io/BlockingDatabaseTest.php +++ b/tests/Io/BlockingDatabaseTest.php @@ -15,7 +15,7 @@ public function testCtorThrowsForInvalidPath() // legacy PHPUnit $this->setExpectedException('Exception'); } - new BlockingDatabase('/dev/foobar'); + new BlockingDatabase('/dev/foo/bar'); } public function testExecReturnsRejectedPromiseForInvalidQuery()