From cbb45c079efc797909087af631f41b9d0c5d3530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Wed, 1 Nov 2023 14:48:36 +0100 Subject: [PATCH] Run tests on PHP 8.3 and update test suite --- .github/workflows/ci.yml | 8 ++++++-- composer.json | 10 ++++++---- phpunit.xml.dist | 6 +++--- phpunit.xml.legacy | 4 ++-- tests/React/Promise/ErrorCollector.php | 4 ++-- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15d2df6f..3666cd47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,10 @@ jobs: strategy: matrix: php: + - 8.3 + - 8.2 + - 8.1 + - 8.0 - 7.4 - 7.3 - 7.2 @@ -21,7 +25,7 @@ jobs: - 5.4 - 5.3 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} @@ -38,7 +42,7 @@ jobs: runs-on: ubuntu-22.04 continue-on-error: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM - name: Run hhvm composer.phar install uses: docker://hhvm/hhvm:3.30-lts-latest diff --git a/composer.json b/composer.json index d4bb23cc..e078381a 100644 --- a/composer.json +++ b/composer.json @@ -9,17 +9,19 @@ "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.36" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, "autoload": { "psr-4": { - "React\\Promise\\": "src/React/Promise/" + "React\\Promise\\": "src/React/Promise/" }, - "files": ["src/React/Promise/functions_include.php"] + "files": [ + "src/React/Promise/functions_include.php" + ] }, "autoload-dev": { "psr-4": { - "React\\Tests\\Promise\\": "tests/React/Promise/" + "React\\Tests\\Promise\\": "tests/React/Promise/" } }, "extra": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 29b76243..a75b6b41 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,8 +1,8 @@ - + - + diff --git a/phpunit.xml.legacy b/phpunit.xml.legacy index edad8422..4c1f64be 100644 --- a/phpunit.xml.legacy +++ b/phpunit.xml.legacy @@ -1,6 +1,6 @@ - + - + diff --git a/tests/React/Promise/ErrorCollector.php b/tests/React/Promise/ErrorCollector.php index dcc21946..64e35774 100644 --- a/tests/React/Promise/ErrorCollector.php +++ b/tests/React/Promise/ErrorCollector.php @@ -10,8 +10,8 @@ public function register() { $errors = array(); - set_error_handler(function ($errno, $errstr, $errfile, $errline, $errcontext) use (&$errors) { - $errors[] = compact('errno', 'errstr', 'errfile', 'errline', 'errcontext'); + set_error_handler(function ($errno, $errstr, $errfile, $errline) use (&$errors) { + $errors[] = compact('errno', 'errstr', 'errfile', 'errline'); }); $this->errors = &$errors;