From a7553a42216418f2975fd16bd6317e97cec0d801 Mon Sep 17 00:00:00 2001 From: Laravel Shift Date: Wed, 5 Jun 2024 14:28:58 -0400 Subject: [PATCH] Laravel 11.x Compatibility (#2579) * Bump dependencies for Laravel 11 * Update GitHub Actions for Laravel 11 --- .github/workflows/run-tests.yml | 86 ++++++++++++++++++--------------- composer.json | 6 +-- 2 files changed, 50 insertions(+), 42 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index dc0089624aa3..3e4f87802467 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,43 +1,51 @@ name: run-tests -on: [push, pull_request] +on: + - push + - pull_request jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - os: [ubuntu-latest, windows-latest] - php: [8.1] - laravel: [^10.0] - stability: [prefer-stable] - include: - - laravel: ^10.0 - testbench: ^8.0 - - 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 }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction - - - name: Execute tests - run: ./vendor/bin/testbench package:test + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest, windows-latest] + php: [8.1, '8.2'] + laravel: ['11.0', ^10.0] + stability: [prefer-stable] + include: + - laravel: ^10.0 + testbench: ^8.0 + - laravel: '11.0' + testbench: ^9.0 + exclude: + - laravel: '11.0' + php: 8.1 + + 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 }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.stability }} --prefer-dist --no-interaction + + - name: Execute tests + run: ./vendor/bin/testbench package:test diff --git a/composer.json b/composer.json index b961a953899b..5c5d4908c328 100644 --- a/composer.json +++ b/composer.json @@ -18,14 +18,14 @@ ], "require": { "php": "^8.0|^8.1", - "illuminate/support": "^9.0|^10.0", + "illuminate/support": "^9.0|^10.0|^11.0", "opis/closure": "^3.6" }, "require-dev": { "brianium/paratest": "^6.2|^7.0.6", - "nunomaduro/collision": "^5.3|^6.1|^7.0", + "nunomaduro/collision": "^5.3|^6.1|^7.0|^8.0", "nunomaduro/larastan": "^2.0", - "orchestra/testbench": "^8.0", + "orchestra/testbench": "^8.0|^9.0", "phpstan/extension-installer": "^1.1", "phpunit/phpunit": "^10.0", "spatie/laravel-ray": "^1.9",