Skip to content

Commit

Permalink
Laravel 11.x Compatibility (#77)
Browse files Browse the repository at this point in the history
* Bump dependencies for Laravel 11

* Update GitHub Actions for Laravel 11

* Update symfony/dotenv on composer.json

---------

Co-authored-by: Andréia Bohner <[email protected]>
  • Loading branch information
laravel-shift and andreia authored Mar 14, 2024
1 parent 28681aa commit 7023f2f
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 60 deletions.
126 changes: 69 additions & 57 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,72 @@
name: "Run Tests - Current"
name: Run Tests - Current

on: [push, pull_request]
on:
- push
- pull_request

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.3, 8.2, 8.1, 8.0, 7.4]
laravel: [9.*, 8.*, 10.*]
dependency-version: [prefer-lowest, prefer-stable]
exclude:
- laravel: 10.*
php: 8.0
- laravel: 10.*
php: 7.4
- laravel: 9.*
php: 7.4
- laravel: 8.*
php: 8.1
- laravel: 8.*
php: 8.2
- laravel: 8.*
php: 8.3
include:
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: 6.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v3
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: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
coverage: pcov

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
cp .env.example .env
- name: Execute tests
run: vendor/bin/phpunit
test:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: [8.3, 8.2, 8.1, 8.0, 7.4]
laravel: ['8.*', '9.*', '10.*', '11.*']
dependency-version: [prefer-lowest, prefer-stable]
exclude:
- laravel: 10.*
php: 8.0
- laravel: 10.*
php: 7.4
- laravel: 9.*
php: 7.4
- laravel: 8.*
php: 8.1
- laravel: 8.*
php: 8.2
- laravel: 8.*
php: 8.3
- laravel: 11.*
php: 8.1
- laravel: 11.*
php: 8.0
- laravel: 11.*
php: 7.4
include:
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: 6.*
- laravel: 11.*
testbench: 9.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v3
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: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
coverage: pcov

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
cp .env.example .env
- name: Execute tests
run: vendor/bin/phpunit
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
"require": {
"php": "^7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.3",
"guzzlehttp/guzzle": "~6.0 || ~7.0",
"illuminate/support": "5.7.* || 5.8.* ||^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0",
"symfony/dotenv": "^4.2 || ^5.1"
"illuminate/support": "5.7.* || 5.8.* ||^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0",
"symfony/dotenv": "^4.2 || ^5.1 || ^7.0"
},
"require-dev": {
"mockery/mockery": "^1.4",
"orchestra/testbench": "^5.0 || ^6.0 || ^7.0 || ^8.0",
"orchestra/testbench": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
Expand Down

0 comments on commit 7023f2f

Please sign in to comment.