Skip to content

Commit

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

* Update GitHub Actions for Laravel 12

* Update run-tests.yml

* Update composer.json

* Update composer.json

* Update run-tests.yml

---------

Co-authored-by: Robert Allport <rob@f9web.co.uk>
  • Loading branch information
laravel-shift and ultrono authored Feb 24, 2025
1 parent 3a93177 commit 9230b80
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
name: run-tests-laravel-8-9

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

jobs:
tests:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.2, 8.3]
laravel: ["^11.0", "^10.0"]
php: [8.3, 8.2]
laravel: ["^12.0", "^11.0", "^10.0"]
dependency-version: [prefer-stable]
include:
- laravel: "^11.0"
- laravel: ^12.0
testbench: 10.*
- laravel: ^11.0
testbench: 9.*
- laravel: "^10.0"
testbench: 8.*
- laravel: ^10.0
testbench: 8.*

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

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

- name: Cache dependencies
uses: actions/cache@v4
with:
Expand All @@ -34,12 +38,16 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, mbstring, zip, pcntl, sqlite, pdo_sqlite, iconv
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
coverage: none

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
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
- name: Display PHP version
run: php -v | grep ^PHP | cut -d' ' -f2

- name: Execute tests
run: vendor/bin/phpunit --color=always tests
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
],
"require": {
"php": "^8.2",
"illuminate/config": "^10.0|^11.0",
"illuminate/container": "^10.0|^11.0",
"illuminate/contracts": "^10.0|^11.0",
"illuminate/database": "^10.0|^11.0"
"illuminate/config": "^10.0|^11.0|^12.0",
"illuminate/container": "^10.0|^11.0|^12.0",
"illuminate/contracts": "^10.0|^11.0|^12.0",
"illuminate/database": "^10.0|^11.0|^12.0"
},
"require-dev": {
"orchestra/testbench": "^8.0|^9.0",
"phpunit/phpunit": "^9.4|^10.1"
"orchestra/testbench": "^8.0|^9.0|^10.0",
"phpunit/phpunit": "^10.1|^11.5.3"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 9230b80

Please sign in to comment.