From 8003a3cbadca5fef2affd4d83d9558eae0d81871 Mon Sep 17 00:00:00 2001 From: Eduard Lupacescu Date: Wed, 12 Mar 2025 16:24:49 +0200 Subject: [PATCH 1/2] feat: laravel 12 support --- .github/workflows/phpstan.yml | 6 +++--- .github/workflows/run-tests.yml | 8 +++++--- composer.json | 10 +++++----- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index cbaaeee..fc72600 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -11,16 +11,16 @@ jobs: name: phpstan runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.4' coverage: none - name: Install composer dependencies - uses: ramsey/composer-install@v1 + uses: ramsey/composer-install@v2 - name: Run PHPStan run: ./vendor/bin/phpstan --error-format=github diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 0716515..499e19a 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,18 +9,20 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - php: [8.2] - laravel: [11.*] + php: [8.2, 8.3, 8.4] + laravel: [11.*, 12.*] stability: [prefer-stable] include: - laravel: 11.* testbench: 9.* + - laravel: 12.* + testbench: 10.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/composer.json b/composer.json index b543b82..73e780f 100644 --- a/composer.json +++ b/composer.json @@ -16,17 +16,17 @@ } ], "require": { - "php": "^8.1|^8.2", - "illuminate/contracts": "^11.0", + "php": "^8.1|^8.2|^8.3|^8.4", + "illuminate/contracts": "^11.0|^12.0", "laravel/slack-notification-channel": "^3.2", "ext-json": "*" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.2", - "laravel/sanctum": "^4.0", - "orchestra/testbench": "^9.0", + "laravel/sanctum": "^4.0|^5.0", + "orchestra/testbench": "^9.0|^10.0", "phpunit/phpunit": "^10.0|^11.0", - "symfony/stopwatch": "^4.4|^5.0", + "symfony/stopwatch": "^4.4|^5.0|^6.0|^7.0", "nunomaduro/larastan": "^2.0", "phpstan/extension-installer": "^1.1" }, From b0c97b6ecdc45ed19fbc691d2b6b797e37030fa5 Mon Sep 17 00:00:00 2001 From: Eduard Lupacescu Date: Wed, 12 Mar 2025 16:29:32 +0200 Subject: [PATCH 2/2] fix: wip --- .github/workflows/phpstan.yml | 4 ++++ .github/workflows/run-tests.yml | 8 +------- composer.json | 12 ++++++------ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index fc72600..04e71a1 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -22,5 +22,9 @@ jobs: - name: Install composer dependencies uses: ramsey/composer-install@v2 + - name: Install PHPStan + run: | + composer require --dev nunomaduro/larastan:^2.9.9 phpstan/extension-installer:^1.1 phpstan/phpstan-deprecation-rules:^1.0|^2.0 phpstan/phpstan-phpunit:^1.0|^2.0 --no-interaction + - name: Run PHPStan run: ./vendor/bin/phpstan --error-format=github diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 499e19a..92072ce 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -41,11 +41,5 @@ jobs: composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update composer update --${{ matrix.stability }} --prefer-dist --no-interaction - - name: Clear Composer cache - run: composer clear-cache - - - name: Wait for a few seconds - run: sleep 5 - - name: Execute tests - run: vendor/bin/phpunit + run: vendor/bin/testbench package:test --parallel --no-coverage diff --git a/composer.json b/composer.json index 73e780f..def0ab4 100644 --- a/composer.json +++ b/composer.json @@ -16,19 +16,19 @@ } ], "require": { - "php": "^8.1|^8.2|^8.3|^8.4", + "php": "^8.2|^8.3|^8.4", "illuminate/contracts": "^11.0|^12.0", "laravel/slack-notification-channel": "^3.2", "ext-json": "*" }, "require-dev": { + "brianium/paratest": "^7.0.6", "friendsofphp/php-cs-fixer": "^3.2", "laravel/sanctum": "^4.0|^5.0", + "nunomaduro/collision": "^8.1", "orchestra/testbench": "^9.0|^10.0", - "phpunit/phpunit": "^10.0|^11.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0|^7.0", - "nunomaduro/larastan": "^2.0", - "phpstan/extension-installer": "^1.1" + "phpunit/phpunit": "^10.0|^11.0|^12.0", + "symfony/stopwatch": "^4.4|^5.0|^6.0|^7.0" }, "autoload": { "psr-4": { @@ -46,7 +46,7 @@ }, "scripts": { "analyse": "vendor/bin/phpstan analyse", - "test": "vendor/bin/phpunit --colors=always", + "test": "vendor/bin/testbench package:test --parallel --no-coverage", "test-coverage": "vendor/bin/phpunit --coverage-html coverage" }, "config": {