From f2abc5c332be887f4e11acf7a2f6f2ed3346ce60 Mon Sep 17 00:00:00 2001 From: Benedikt Franke Date: Fri, 1 Mar 2024 11:56:52 +0100 Subject: [PATCH 1/3] Support Laravel 11 --- .github/workflows/format.yml | 6 +++--- .github/workflows/validate.yml | 16 ++++++++-------- composer.json | 11 +++++------ phpstan.neon | 4 ++++ 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 869ad04..ce60721 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 }} @@ -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 }} 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..3e864ec 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": "^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#' + From c1157d4a337e76ed4848c8d6b99a96259c86158e Mon Sep 17 00:00:00 2001 From: Benedikt Franke Date: Fri, 1 Mar 2024 11:58:02 +0100 Subject: [PATCH 2/3] format with PHP 8.2 --- .github/workflows/format.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index ce60721..a916a34 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -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 @@ -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 From 6b9c28e642b86af3b9cf2640e4a791b688b73621 Mon Sep 17 00:00:00 2001 From: Benedikt Franke Date: Fri, 1 Mar 2024 11:58:16 +0100 Subject: [PATCH 3/3] restore console version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3e864ec..c69a843 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ ], "require": { "php": "^8", - "illuminate/console": "^11", + "illuminate/console": "^9 || ^10 || ^11", "illuminate/contracts": "^9 || ^10 || ^11", "illuminate/support": "^9 || ^10 || ^11" },