Skip to content

Commit

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

* Update GitHub Actions for Laravel 11
  • Loading branch information
laravel-shift authored May 3, 2024
1 parent 9ea34cf commit b441472
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 39 deletions.
76 changes: 41 additions & 35 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,44 @@ on:
pull_request:

jobs:
php-tests:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ["8.1"]
laravel: ["^9.0", "10.0"]
dependency-version: [prefer-lowest, prefer-stable]

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

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

- name: Cache dependencies
uses: actions/cache@v2
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, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --dev --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit
php-tests:
if: "github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository"

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2']
laravel: ['10.0', '11.0', ^9.0]
dependency-version: [prefer-lowest, prefer-stable]
exclude:
- laravel: '11.0'
php: '8.1'

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

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

- name: Cache dependencies
uses: actions/cache@v2
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, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --dev --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
],
"require": {
"php": "^8.0",
"illuminate/support": "^8.0 || ^9.0|^10.0",
"illuminate/database": "^8.53 || ^9.0|^10.0"
"illuminate/support": "^8.0 || ^9.0|^10.0 || ^11.0",
"illuminate/database": "^8.53 || ^9.0|^10.0 || ^11.0"
},
"require-dev": {
"orchestra/testbench": "^6.23 || ^7.0|^8.0",
"phpunit/phpunit": "^9.5"
"orchestra/testbench": "^6.23 || ^7.0|^8.0 || ^9.0",
"phpunit/phpunit": "^9.5 || ^10.5"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit b441472

Please sign in to comment.