Skip to content

Commit

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

* Update GitHub Actions for Laravel 12
  • Loading branch information
laravel-shift authored Feb 19, 2025
1 parent 966b2b0 commit 69e0e25
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 59 deletions.
99 changes: 53 additions & 46 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,57 @@
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]
php: [8.3, 8.2, 8.1]
laravel: [11.*, 10.*, 9.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 11.*
testbench: 9.*
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
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@v4

- 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: true
matrix:
os: [ubuntu-latest]
php: [8.3, 8.2, 8.1]
laravel: ['9.*', '10.*', '11.*', '12.*']
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 11.*
testbench: 9.*
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- 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@v4

- 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
25 changes: 12 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,25 @@
"email": "freek@spatie.be"
}
],
"keywords":
[
"sort",
"sortable",
"eloquent",
"model",
"laravel",
"behaviour"
],
"keywords": [
"sort",
"sortable",
"eloquent",
"model",
"laravel",
"behaviour"
],
"license": "MIT",
"require": {
"php": "^8.1",
"illuminate/database": "^9.31|^10.0|^11.0",
"illuminate/support": "^9.31|^10.0|^11.0",
"illuminate/database": "^9.31|^10.0|^11.0|^12.0",
"illuminate/support": "^9.31|^10.0|^11.0|^12.0",
"nesbot/carbon": "^2.63|^3.0",
"spatie/laravel-package-tools": "^1.9"
},
"require-dev": {
"phpunit/phpunit" : "^9.5|^10.0",
"orchestra/testbench": "^7.0|^8.0|^9.0"
"phpunit/phpunit": "^9.5|^10.0|^11.5.3",
"orchestra/testbench": "^7.0|^8.0|^9.0|^10.0"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 69e0e25

Please sign in to comment.