Skip to content

Commit

Permalink
Laravel 12.x Compatibility (#366)
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

---------

Co-authored-by: Freek Van der Herten <freek@spatie.be>
  • Loading branch information
laravel-shift and freekmurze authored Feb 21, 2025
1 parent 9145dce commit 5af12aa
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 56 deletions.
95 changes: 51 additions & 44 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,55 @@
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.1, 8.2, 8.3]
laravel: [10.*, 11.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*
exclude:
- laravel: 11.*
php: 8.1

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ 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
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.dependency-version }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit
test:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.1, 8.2, 8.3]
laravel: ['10.*', '11.*', '12.*']
dependency-version: [prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*
- laravel: 12.*
testbench: 10.*
exclude:
- laravel: 11.*
php: 8.1
- laravel: 12.*
php: 8.1

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ 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
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.dependency-version }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit
24 changes: 12 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@
"ext-json": "*",
"graham-campbell/guzzle-factory": "^5.0|^7.0",
"guzzlehttp/guzzle": "^7.4|^7.2",
"illuminate/cache": "^10.0|^11.0",
"illuminate/config": "^10.0|^11.0",
"illuminate/console": "^10.0|^11.0",
"illuminate/container": "^10.0|^11.0",
"illuminate/contracts": "^10.0|^11.0",
"illuminate/events": "^10.0|^11.0",
"illuminate/filesystem": "^10.0|^11.0",
"illuminate/notifications": "^10.0|^11.0",
"illuminate/support": "^10.0|^11.0",
"illuminate/cache": "^10.0|^11.0|^12.0",
"illuminate/config": "^10.0|^11.0|^12.0",
"illuminate/console": "^10.0|^11.0|^12.0",
"illuminate/container": "^10.0|^11.0|^12.0",
"illuminate/contracts": "^10.0|^11.0|^12.0",
"illuminate/events": "^10.0|^11.0|^12.0",
"illuminate/filesystem": "^10.0|^11.0|^12.0",
"illuminate/notifications": "^10.0|^11.0|^12.0",
"illuminate/support": "^10.0|^11.0|^12.0",
"laravel/slack-notification-channel": "^2.4|^3.2",
"spatie/ssl-certificate": "^1.22|^2.1.2",
"spatie/url": "^2.0.0"
},
"require-dev": {
"mockery/mockery": "^1.4",
"illuminate/testing": "^10.0|^11.0",
"orchestra/testbench": "^8.0|^9.0",
"phpunit/phpunit": "^9.5|^10.5"
"illuminate/testing": "^10.0|^11.0|^12.0",
"orchestra/testbench": "^8.0|^9.0|^10.0",
"phpunit/phpunit": "^9.5|^10.5|^11.5.3"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 5af12aa

Please sign in to comment.