From a7ff75043081e376f647162b39dbd3f60f5e54fb Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Thu, 29 Feb 2024 09:01:11 +0100 Subject: [PATCH] Add Laravel 11 support --- .github/workflows/phpstan.yml | 4 +++- .github/workflows/run-tests.yml | 20 +++++++++++--------- composer.json | 8 ++++---- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 557d263..ee82e48 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -5,13 +5,15 @@ on: paths: - '**.php' - 'phpstan.neon.dist' + pull_request: + types: [opened, synchronize, reopened] jobs: phpstan: name: phpstan runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 39ff7ee..22e99ce 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -2,9 +2,9 @@ name: run-tests on: push: - branches: [main] + branches: [master] pull_request: - branches: [main] + types: [opened, synchronize, reopened] jobs: test: @@ -13,18 +13,20 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [8.1] - laravel: [9.*] + php: ['8.1', '8.2','8.3'] + laravel: ['9.*','10.*','11.*'] stability: [prefer-lowest, prefer-stable] - include: - - laravel: 9.* - testbench: 7.* + exclude: + - laravel: '9.*' + stability: prefer-lowest + - laravel: '11.*' + php: '8.1' 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 @@ -40,7 +42,7 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer require "illuminate/contracts:${{ matrix.laravel }}" --no-interaction --no-update composer update --${{ matrix.stability }} --prefer-dist --no-interaction - name: Execute tests diff --git a/composer.json b/composer.json index e7881b2..bf45cdc 100644 --- a/composer.json +++ b/composer.json @@ -22,15 +22,15 @@ ], "require": { "php": "^8.1", - "illuminate/contracts": "^9.0|^10.0", - "illuminate/http": "^9.0|^10.0", + "illuminate/contracts": "^9.0|^10.0|^11.0", + "illuminate/http": "^9.0|^10.0|^11.0", "spatie/laravel-package-tools": "^1.9.2" }, "require-dev": { "laravel/pint": "^0.2.2", "nunomaduro/collision": "^6.0", - "nunomaduro/larastan": "^2.0.1", - "orchestra/testbench": "^7.0", + "larastan/larastan": "^2.0.1", + "orchestra/testbench": "^7.0|^8.0|^9.0", "pestphp/pest": "^1.21", "pestphp/pest-plugin-laravel": "^1.1", "phpstan/extension-installer": "^1.1",