From bf2c36f265cd9e8e8135e40184cf2b2863387ce9 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 4 Nov 2026 22:22:24 +0000 Subject: [PATCH] Run tests on supported PHP 8.2 through 8.5 PHP 7.2 is end of life. Matrix the test workflow across the branches php.net still supports, keep fail-fast off, and include the PHP version in the Composer cache key. PHPUnit 8 and the released AspectMock 4.1.1 cannot run this suite on those versions. Pin AspectMock to the unreleased commit that calls the Go! AOP 3.1 API, and move PHPUnit to 9.6. Co-authored-by: August Flanagan --- .github/workflows/test.yml | 14 +++++++++----- composer.json | 37 +++++++++++++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 59641d6..f109b9c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,26 +9,30 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php-version: ['8.2', '8.3', '8.4', '8.5'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v7 - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: 7.2 + php-version: ${{ matrix.php-version }} - name: Validate composer.json and composer.lock run: composer validate --strict - name: Cache Composer packages id: composer-cache - uses: actions/cache@v4 + uses: actions/cache@v6 with: path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }} restore-keys: | - ${{ runner.os }}-php- + ${{ runner.os }}-php-${{ matrix.php-version }}- - name: Install dependencies run: composer install --prefer-dist --no-progress diff --git a/composer.json b/composer.json index 09d7af4..648e925 100644 --- a/composer.json +++ b/composer.json @@ -17,11 +17,44 @@ "symfony/yaml": "^5.4.54|^6.4.45|^7.4.18|^8.1.6" }, "require-dev": { - "phpunit/phpunit": "^8.5.52", + "phpunit/phpunit": "^9.6", "friendsofphp/php-cs-fixer": "^2.18", "ext-curl": "*", - "codeception/aspect-mock": "^3.1" + "codeception/aspect-mock": "5.0.0-dev" }, + "repositories": [ + { + "type": "package", + "package": { + "name": "codeception/aspect-mock", + "version": "5.0.0-dev", + "description": "AspectMock commit 5a078a6 (unreleased 5.0-dev). That commit's own composer.json requires unreleased goaop 4; goaop/framework 3.1.1 already exposes the API this commit calls and runs on PHP 8.2-8.5.", + "license": "MIT", + "source": { + "type": "git", + "url": "https://github.com/Codeception/AspectMock.git", + "reference": "5a078a62103ccd87c8cf5e2b7bbc9434f8140025" + }, + "dist": { + "type": "zip", + "url": "https://codeload.github.com/Codeception/AspectMock/zip/5a078a62103ccd87c8cf5e2b7bbc9434f8140025", + "reference": "5a078a62103ccd87c8cf5e2b7bbc9434f8140025" + }, + "require": { + "php": "^8.2", + "goaop/framework": "^3.1.1", + "goaop/parser-reflection": "^3.1.0", + "phpunit/phpunit": "^9.5", + "symfony/finder": "^4.4 || ^5.4 || ^6.0" + }, + "autoload": { + "psr-0": { + "AspectMock": "src/" + } + } + } + } + ], "autoload": { "psr-4": { "Cronitor\\": "lib/"