Skip to content

Commit

Permalink
Laravel 11.x Compatibility (#2579)
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 Jun 5, 2024
1 parent 494c837 commit a7553a4
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 42 deletions.
86 changes: 47 additions & 39 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit a7553a4

Please sign in to comment.