From 38d3452c794b41300081aeac78490e08187afbdc Mon Sep 17 00:00:00 2001 From: Benedikt Franke Date: Fri, 1 Mar 2024 11:59:06 +0100 Subject: [PATCH] Support Laravel 11 --- .github/workflows/format.yml | 10 +++++----- .github/workflows/validate.yml | 16 ++++++++-------- composer.json | 11 +++++------ phpstan.neon | 4 ++++ 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 869ad04..a916a34 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -8,7 +8,7 @@ jobs: composer-normalize: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} @@ -16,7 +16,7 @@ jobs: with: coverage: none extensions: mbstring - php-version: 8.1 + php-version: 8.2 - run: composer install --no-interaction --no-progress --no-suggest @@ -29,7 +29,7 @@ jobs: prettier: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} @@ -44,7 +44,7 @@ jobs: php-cs-fixer: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} @@ -52,7 +52,7 @@ jobs: with: coverage: none extensions: mbstring - php-version: 8.1 + php-version: 8.2 - run: composer install --no-interaction --no-progress --no-suggest diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index ada93cb..3e366d1 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,4 +1,5 @@ -name: "Validate" +name: Validate + on: pull_request: push: @@ -20,6 +21,7 @@ jobs: laravel-version: - "^9" - "^10" + - "^11" composer: - name: lowest arg: "--prefer-lowest --prefer-stable" @@ -28,9 +30,13 @@ jobs: exclude: - php-version: "8.0" laravel-version: "^10" + - php-version: "8.0" + laravel-version: "^11" + - php-version: "8.1" + laravel-version: "^11" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: @@ -38,12 +44,6 @@ jobs: extensions: ${{ env.REQUIRED_PHP_EXTENSIONS }} php-version: ${{ matrix.php-version }} - - name: "Cache composer dependencies" - uses: actions/cache@v3 - with: - path: ~/.composer/cache - key: php-${{ matrix.php-version }}-composer-${{ matrix.laravel-version }}-os-${{ matrix.os }}-composer-${{ matrix.composer.name }} - - run: > composer require illuminate/contracts:${{ matrix.laravel-version }} diff --git a/composer.json b/composer.json index 0a6c9a8..c69a843 100644 --- a/composer.json +++ b/composer.json @@ -15,16 +15,15 @@ ], "require": { "php": "^8", - "illuminate/console": "^9 || ^10", - "illuminate/contracts": "^9 || ^10", - "illuminate/support": "^9 || ^10" + "illuminate/console": "^9 || ^10 || ^11", + "illuminate/contracts": "^9 || ^10 || ^11", + "illuminate/support": "^9 || ^10 || ^11" }, "require-dev": { "ergebnis/composer-normalize": "^2.29", - "laravel/lumen-framework": "^9 || ^10", + "larastan/larastan": "^2.5.2", "mll-lab/php-cs-fixer-config": "^5", - "nunomaduro/larastan": "^2.5.2", - "orchestra/testbench": "^7.7 || ^8.8", + "orchestra/testbench": "^7.7 || ^8.8 || ^9", "phpstan/extension-installer": "^1", "phpstan/phpstan": "^1.10.15", "phpstan/phpstan-mockery": "^1.1.1", diff --git a/phpstan.neon b/phpstan.neon index dd8cab4..b6706d8 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -8,3 +8,7 @@ parameters: # Install https://plugins.jetbrains.com/plugin/7677-awesome-console to make those links clickable editorUrl: '%%relFile%%:%%line%%' editorUrlTitle: '%%relFile%%:%%line%%' + ignoreErrors: + # Lumen does not support Laravel 11 + - '#Laravel\\Lumen#' +