From aaf88739159ec415137738e4cc2b93b179fc1094 Mon Sep 17 00:00:00 2001 From: Laravel Shift Date: Sat, 2 Mar 2024 00:30:59 -0500 Subject: [PATCH] Laravel 11.x Compatibility (#172) * Bump dependencies for Laravel 11 * Update GitHub Actions for Laravel 11 --- .github/workflows/run-tests.yml | 91 ++++++++++++++++++--------------- composer.json | 6 +-- 2 files changed, 53 insertions(+), 44 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 880b876..efc2d64 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,45 +1,54 @@ name: run-tests -on: [push, pull_request] +on: + - push + - pull_request jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - php: [8.2, 8.1, 8.0] - laravel: [8.*, 9.*, 10.*] - dependency-version: [prefer-stable] - include: - - laravel: 10.* - testbench: 8.* - - laravel: 9.* - testbench: 7.* - - laravel: 8.* - testbench: 6.* - exclude: - - laravel: 10.* - php: 8.0 - - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - 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 - coverage: none - - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.63" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - - - name: Execute tests - run: vendor/bin/phpunit + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + php: [8.2, 8.1, 8.0] + laravel: ['8.*', '9.*', '10.*', '11.*'] + dependency-version: [prefer-stable] + include: + - laravel: 10.* + testbench: 8.* + - laravel: 9.* + testbench: 7.* + - laravel: 8.* + testbench: 6.* + - laravel: 11.* + testbench: 9.* + exclude: + - laravel: 10.* + php: 8.0 + - laravel: 11.* + php: 8.1 + - laravel: 11.* + php: 8.0 + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - 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 + coverage: none + + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.63" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction + + - name: Execute tests + run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index 77e9353..431d978 100644 --- a/composer.json +++ b/composer.json @@ -23,11 +23,11 @@ ], "require": { "php": "^7.2|^8.0", - "illuminate/translation": "^6.0|^7.0|^8.0|^9.0|^10.0" + "illuminate/translation": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0" }, "require-dev": { - "phpunit/phpunit": "^8.0|^9.0", - "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0" + "phpunit/phpunit": "^8.0|^9.0|^10.5", + "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0" }, "autoload": { "psr-4": {