From 8bb51e36d280a2dc446cf8b278d9b07830e8d67b Mon Sep 17 00:00:00 2001 From: Laravel Shift Date: Fri, 8 Mar 2024 09:58:15 -0500 Subject: [PATCH] Laravel 11.x Compatibility (#89) * Bump dependencies for Laravel 11 * Update GitHub Actions for Laravel 11 --- .github/workflows/run-tests.yml | 127 ++++++++++++++++++-------------- composer.json | 4 +- 2 files changed, 72 insertions(+), 59 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index d6744ff..0a60daa 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,62 +1,75 @@ name: run-tests on: - push: - branches: [main] - pull_request: - branches: [main] + push: + branches: + - main + pull_request: + branches: + - main jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - os: [ubuntu-latest, windows-latest] - php: [8.2, 8.1, 8.0, 7.4] - laravel: [10.*, 9.*, 8.*, 7.*] - stability: [prefer-lowest, prefer-stable] - include: - - laravel: 10.* - testbench: 8.* - - laravel: 9.* - testbench: 7.* - - laravel: 8.* - testbench: ^6.23 - - laravel: 7.* - testbench: ^5.20 - exclude: - - php: 7.4 - laravel: 10.* - - php: 8.0 - laravel: 10.* - - php: 7.4 - laravel: 9.* - - php: 8.1 - laravel: 7.* - - php: 8.2 - laravel: 7.* - - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo - coverage: none - - - name: Setup problem matchers - run: | - echo "::add-matcher::${{ runner.tool_cache }}/php.json" - echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.65" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction - - name: Execute tests - run: vendor/bin/phpunit + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest, windows-latest] + php: [8.2, 8.1, 8.0, 7.4] + laravel: ['7.*', '8.*', '9.*', '10.*', '11.*'] + stability: [prefer-lowest, prefer-stable] + include: + - laravel: 10.* + testbench: 8.* + - laravel: 9.* + testbench: 7.* + - laravel: 8.* + testbench: ^6.23 + - laravel: 7.* + testbench: ^5.20 + - laravel: 11.* + testbench: 9.* + exclude: + - php: 7.4 + laravel: 10.* + - php: 8.0 + laravel: 10.* + - php: 7.4 + laravel: 9.* + - php: 8.1 + laravel: 7.* + - php: 8.2 + laravel: 7.* + - laravel: 11.* + php: 8.1 + - laravel: 11.* + php: 8.0 + - laravel: 11.* + php: 7.4 + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo + coverage: none + + - name: Setup problem matchers + run: | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.65" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.stability }} --prefer-dist --no-interaction + + - name: Execute tests + run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index 7faddf9..ced55cc 100644 --- a/composer.json +++ b/composer.json @@ -11,11 +11,11 @@ ], "require": { "php": "^7.4|^8.0", - "laravel/framework": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0", + "laravel/framework": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", "league/glide": "^1.5|^1.6|^2.0" }, "require-dev": { - "orchestra/testbench": "^5.20|^6.13|^7.0|^8.0" + "orchestra/testbench": "^5.20|^6.13|^7.0|^8.0|^9.0" }, "autoload": { "psr-4": {