From ec0e8bd2f48f0c29ea8928ab642cd0e4f63aa8dc Mon Sep 17 00:00:00 2001 From: Jasper Tey Date: Tue, 7 May 2024 14:39:55 -0400 Subject: [PATCH] Laravel 11 support (adapted from unmerged laravel-shift PR) --- .github/workflows/tests.yml | 29 +++++++++++++++++------------ .gitignore | 1 + composer.json | 13 ++++++++----- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6b7c638..7c83412 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,19 +4,22 @@ on: push: branches: - main - pull_request: - types: [ opened, synchronize, reopened ] + types: + - opened + - synchronize + - reopened jobs: test: runs-on: ubuntu-latest + strategy: fail-fast: false matrix: - php: [ 7.4, 8.0, 8.1, 8.2 ] - laravel: [ 8.*, 9.* , 10.*] - dependency-version: [ prefer-lowest, prefer-stable ] + php: [7.4, 8.0, 8.1, 8.2] + laravel: ['8.*', '9.*', '10.*', '11.*'] + dependency-version: [prefer-lowest, prefer-stable] include: - laravel: 10.* testbench: 8.* @@ -24,7 +27,8 @@ jobs: testbench: 6.* - laravel: 9.* testbench: 7.* - + - laravel: 11.* + testbench: 9.* exclude: - laravel: 10.* php: 7.3 @@ -32,19 +36,20 @@ jobs: php: 7.4 - laravel: 10.* php: 8.0 - - # PHP 8.1 requires Laravel 8.65, so skip lowest - laravel: 8.* php: 8.1 dependency-version: prefer-lowest - - # PHP 8.2 requires Laravel 8.65, so skip lowest - laravel: 8.* php: 8.2 dependency-version: prefer-lowest - - laravel: 9.* php: 7.4 + - laravel: 11.* + php: 7.4 + - laravel: 11.* + php: 8.0 + - laravel: 11.* + php: 8.1 name: P${{ matrix.php }} / L${{ matrix.laravel }} / ${{ matrix.dependency-version }} @@ -85,4 +90,4 @@ jobs: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - name: Execute tests - run: vendor/bin/phpunit + run: vendor/bin/phpunit \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7479fc6..f135065 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /storage/framework/testing .env .phpunit.result.cache +.phpunit.cache npm-debug.log yarn-error.log composer.lock diff --git a/composer.json b/composer.json index 768c2cc..b16df48 100644 --- a/composer.json +++ b/composer.json @@ -10,14 +10,14 @@ } ], "require": { - "php": "^7.4|^8.0", - "illuminate/database": "^8.37|^9.0|^10.0" + "php": "^7.4|^8.0|^8.1|^8.2", + "illuminate/database": "^8.37|^9.0|^10.0|^11.0" }, "require-dev": { - "orchestra/testbench": "^6|^7|^8.0", + "orchestra/testbench": "^6|^7|^8.0|^9.0", "mockery/mockery": "^1.3.3", - "phpunit/phpunit": ">=8.5.23|^9", - "laravel/scout": "^9.4" + "phpunit/phpunit": ">=8.5.23|^9|^10", + "laravel/scout": "^9.4|^10.8" }, "autoload": { "psr-4": { @@ -29,6 +29,9 @@ "Hammerstone\\FastPaginate\\Tests\\": "tests/" } }, + "scripts": { + "test": "vendor/bin/phpunit" + }, "extra": { "laravel": { "providers": [