From 22dd9d7acd4c69235d7260415eae7e83fa5f7eab Mon Sep 17 00:00:00 2001 From: Alies Lapatsin Date: Tue, 12 Mar 2024 23:12:11 +0100 Subject: [PATCH 1/2] Drop Laravel 9 support --- .github/workflows/test.yml | 9 ++------ composer.json | 22 +++++++++--------- stubs/9/DBFacade.stubphp | 16 ------------- stubs/9/Foundation/helpers.stubphp | 12 ---------- stubs/legacy-factories/helpers.stubphp | 2 +- .../acceptance/DBFacadeAlias.feature | 18 +-------------- .../acceptance/EloquentBuilderTypes.feature | 23 ------------------- 7 files changed, 15 insertions(+), 87 deletions(-) delete mode 100644 stubs/9/DBFacade.stubphp delete mode 100644 stubs/9/Foundation/helpers.stubphp diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 172be3f4..41ca956a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,14 +52,9 @@ jobs: strategy: fail-fast: true matrix: - php: [8.3, 8.2, 8.0] - laravel: [^11.0, ^10.0, ^9.0] + php: [8.3, 8.2, 8.1] + laravel: [^11.0, ^10.0] dependencies: [lowest, highest] - exclude: - - php: 8.0 - laravel: ^10.0 - - php: 8.0 - laravel: ^11.0 name: Acceptance P${{ matrix.php }} | L${{ matrix.laravel }} | ${{ matrix.dependencies == 'highest' && '↑' || '↓' }} steps: - name: Checkout code diff --git a/composer.json b/composer.json index b9b84ecd..79bc269c 100644 --- a/composer.json +++ b/composer.json @@ -11,20 +11,20 @@ ], "homepage": "https://github.com/psalm/psalm-plugin-laravel", "require": { - "php": "^8.0.2", + "php": "^8.1", "ext-simplexml": "*", "barryvdh/laravel-ide-helper": "^2.13 || ^3.0", - "illuminate/config": "^9.52.16 || ^10.48 || ^11.0", - "illuminate/container": "^9.52.16 || ^10.48 || ^11.0", - "illuminate/contracts": "^9.52.16 || ^10.48 || ^11.0", - "illuminate/database": "^9.52.16 || ^10.48 || ^11.0", - "illuminate/events": "^9.52.16 || ^10.48 || ^11.0", - "illuminate/http": "^9.52.16 || ^10.48 || ^11.0", - "illuminate/routing": "^9.52.16 || ^10.48 || ^11.0", - "illuminate/support": "^9.52.16 || ^10.48 || ^11.0", - "illuminate/view": "^9.52.16 || ^10.48 || ^11.0", + "illuminate/config": "^10.48 || ^11.0", + "illuminate/container": "^10.48 || ^11.0", + "illuminate/contracts": "^10.48 || ^11.0", + "illuminate/database": "^10.48 || ^11.0", + "illuminate/events": "^10.48 || ^11.0", + "illuminate/http": "^10.48 || ^11.0", + "illuminate/routing": "^10.48 || ^11.0", + "illuminate/support": "^10.48 || ^11.0", + "illuminate/view": "^10.48 || ^11.0", "nikic/php-parser": "^4.18 || ^5.0", - "orchestra/testbench": "^7.40 || ^8.21 || ^9.0", + "orchestra/testbench": "^8.21 || ^9.0", "symfony/console": "^6.0 || ^7.0", "vimeo/psalm": "^5.20" }, diff --git a/stubs/9/DBFacade.stubphp b/stubs/9/DBFacade.stubphp deleted file mode 100644 index 698ba8ea..00000000 --- a/stubs/9/DBFacade.stubphp +++ /dev/null @@ -1,16 +0,0 @@ - """ - Scenario: call the DB facade alias [ Laravel 9 ] - Given I have the "laravel/framework" package satisfying the "^9.0" - And I have the following code - """ - $builder - * @psalm-return Builder|User - */ - function test_firstOrCreate(Builder $builder): Builder|User { - return $builder->firstOrCreate(); - } - - /** - * @psalm-param Builder $builder - * @psalm-return Builder|User - */ - function test_firstOrNew(Builder $builder): Builder|User { - return $builder->firstOrNew(); - } - """ - When I run Psalm - Then I see no errors - Scenario: can call whereDate with \DateTimeInterface|string|null Given I have the following code """ From 2bdcf3a6766162821772c1635a29d593e83a2e98 Mon Sep 17 00:00:00 2001 From: Alies Lapatsin Date: Tue, 12 Mar 2024 23:20:06 +0100 Subject: [PATCH 2/2] Exclude PHP8.1 & L11 combo L11 requires 8.2+ --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 41ca956a..d59a21d9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,6 +55,9 @@ jobs: php: [8.3, 8.2, 8.1] laravel: [^11.0, ^10.0] dependencies: [lowest, highest] + exclude: + - php: 8.1 + laravel: ^11.0 name: Acceptance P${{ matrix.php }} | L${{ matrix.laravel }} | ${{ matrix.dependencies == 'highest' && '↑' || '↓' }} steps: - name: Checkout code