From 9e631111914a6ab5e39859c9db1bb500b5ae33e3 Mon Sep 17 00:00:00 2001 From: Brian Sweeney Date: Sat, 14 Dec 2024 13:04:35 -0500 Subject: [PATCH 1/2] Update github actions configuration - adds PHP 8.4 to test matrix - normalizes configuration based on the Dompdf project --- .github/workflows/test.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 22466fd..b352546 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,7 @@ name: "Run unit tests" on: - push - pull_request + - workflow_dispatch env: COMPOSER_MEMORY_LIMIT: -1 @@ -11,13 +12,16 @@ jobs: test: name: "Build" runs-on: ubuntu-latest + strategy: max-parallel: 12 matrix: - php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', 8.3'] + php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] + package-release: [dist] + steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup PHP ${{ matrix.php }} uses: shivammathur/setup-php@v2 @@ -26,7 +30,9 @@ jobs: extensions: exif,json,mbstring,dom - name: Install composer dependencies - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 + with: + dependency-versions: ${{ matrix.package-release }} - name: Run unit tests run: ./vendor/bin/phpunit From 38e5014cb7e7487be7204a97cffbaa2dfb5c691b Mon Sep 17 00:00:00 2001 From: Brian Sweeney Date: Sat, 14 Dec 2024 13:48:33 -0500 Subject: [PATCH 2/2] Support phpunit 11 --- composer.json | 2 +- tests/Svg/PathTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index bf2b153..4a8abe3 100644 --- a/composer.json +++ b/composer.json @@ -26,6 +26,6 @@ "sabberworm/php-css-parser": "^8.4" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5" + "phpunit/phpunit": "^7.5 || ^8 || ^9 || ^10 || ^11" } } diff --git a/tests/Svg/PathTest.php b/tests/Svg/PathTest.php index 9a2348f..1cefcb9 100644 --- a/tests/Svg/PathTest.php +++ b/tests/Svg/PathTest.php @@ -76,6 +76,7 @@ public static function commandProvider(): array * @param string $commandSequence * @param array $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('commandProvider')] public function testParseCommands(string $commandSequence, array $expected) { $result = Path::parse($commandSequence);