From 478b700d9edbbc40d71a22ad717b69b46a394552 Mon Sep 17 00:00:00 2001 From: Laravel Shift Date: Sat, 2 Mar 2024 01:00:06 -0500 Subject: [PATCH] Laravel 11.x Compatibility (#113) * Bump dependencies for Laravel 11 * Update GitHub Actions for Laravel 11 --- .github/workflows/run-tests.yml | 104 +++++++++++++++++--------------- composer.json | 6 +- 2 files changed, 59 insertions(+), 51 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index e28f4db..a8bbfff 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,52 +1,60 @@ 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: [9.*, 10.*] - dependency-version: [prefer-stable] - include: - - laravel: 10.* - testbench: 8.* - - laravel: 9.* - testbench: 7.* - 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: Cache dependencies - uses: actions/cache@v1 - with: - path: ~/.composer/cache/files - key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - - - 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 --no-suggest - - - name: Execute tests - run: vendor/bin/phpunit - env: - GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + php: [8.2, 8.1, 8.0] + laravel: ['9.*', '10.*', '11.*'] + dependency-version: [prefer-stable] + include: + - laravel: 10.* + testbench: 8.* + - laravel: 9.* + testbench: 7.* + - 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: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache/files + key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - 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 --no-suggest + + - name: Execute tests + run: vendor/bin/phpunit + env: + GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} diff --git a/composer.json b/composer.json index e3029d2..97bd9a8 100644 --- a/composer.json +++ b/composer.json @@ -18,12 +18,12 @@ ], "require": { "php": "^7.2|^8.0", - "illuminate/support": "^6.0|^7.0|^8.67|^9.0|^10.0", + "illuminate/support": "^6.0|^7.0|^8.67|^9.0|^10.0|^11.0", "guzzlehttp/guzzle": "^6.5|^7.0" }, "require-dev": { - "phpunit/phpunit": "^8.5.21|^9.0|^9.4.4", - "orchestra/testbench": "^4.0|^5.0|^6.0|^8.0" + "phpunit/phpunit": "^8.5.21|^9.0|^9.4.4|^10.5", + "orchestra/testbench": "^4.0|^5.0|^6.0|^8.0|^9.0" }, "autoload": { "psr-4": {