Laravel 13.x Compatibility (#1763)

* Bump dependencies for Laravel 13

* Update GitHub Actions for Laravel 13

* Update workflow to remove cron schedule

Removed cron schedule and adjusted pull request branches.

* Fix syntax, modify Laravel version in run-tests.yml

Updated Laravel version from '13.0' to '13.x' in CI configuration.

* Update test-ci command in composer.json

* Fix test-ci command in composer.json

---------

Co-authored-by: Barry vd. Heuvel <[email protected]>
This commit is contained in:
Laravel Shift
2026-02-21 09:54:37 +01:00
committed by GitHub
co-authored by Barry vd. Heuvel
parent 37dfcf9e14
commit e9b62b6ee0
3 changed files with 102 additions and 94 deletions
+65 -61
View File
@@ -1,75 +1,79 @@
name: Integration Tests
on:
push:
branches:
- master
pull_request:
branches:
- "*"
schedule:
- cron: '0 0 * * *'
push:
branches:
- master
pull_request:
branches:
- "*"
jobs:
php-laravel-integration-tests:
runs-on: ubuntu-22.04
timeout-minutes: 15
env:
COMPOSER_NO_INTERACTION: 1
strategy:
fail-fast: false
matrix:
php: [8.5, 8.4, 8.3, 8.2]
laravel: [11.x, 12.x]
php-laravel-integration-tests:
runs-on: ubuntu-22.04
name: P${{ matrix.php }} - Laravel${{ matrix.laravel }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
path: src
timeout-minutes: 15
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
env:
COMPOSER_NO_INTERACTION: 1
- name: Install dependencies
run: |
composer create-project --prefer-dist laravel/laravel:${{ matrix.laravel }} --stability=dev --no-progress sample
cd sample
composer config minimum-stability dev
composer update --prefer-stable --prefer-dist --no-progress
strategy:
fail-fast: false
matrix:
php: [8.5, 8.4, 8.3, 8.2]
laravel: [11.x, 12.x, 13.x]
exclude:
- laravel: 13.x
php: 8.2
- name: Add package from source
run: |
cd sample
sed -e 's|"type": "project",|&\n"repositories": [ { "type": "path", "url": "../src" } ],|' -i composer.json
composer require --dev "barryvdh/laravel-ide-helper:*" --with-all-dependencies
name: P${{ matrix.php }} - Laravel${{ matrix.laravel }}
- name: Execute generate run
run: |
cd sample
php artisan ide-helper:generate
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
path: src
- name: Execute meta run
run: |
cd sample
php artisan ide-helper:meta -v
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Check file existence
run: |
ls sample/_ide_helper.php
ls sample/.phpstorm.meta.php
- name: Install dependencies
run: |
composer create-project --prefer-dist laravel/laravel:${{ matrix.laravel }} --stability=dev --no-progress sample
cd sample
composer config minimum-stability dev
composer update --prefer-stable --prefer-dist --no-progress
- name: Add package from source
run: |
cd sample
sed -e 's|"type": "project",|&\n"repositories": [ { "type": "path", "url": "../src" } ],|' -i composer.json
composer require --dev "barryvdh/laravel-ide-helper:*" --with-all-dependencies
- name: Check logs
run: |
if [ `ls -1q "sample/storage/logs/" | wc -l` -gt 0 ]; then
for logfile in sample/storage/logs/*; do
echo "-- $logfile --"
cat $logfile
done
exit 1
fi
- name: Execute generate run
run: |
cd sample
php artisan ide-helper:generate
- name: Execute meta run
run: |
cd sample
php artisan ide-helper:meta -v
- name: Check file existence
run: |
ls sample/_ide_helper.php
ls sample/.phpstorm.meta.php
- name: Check logs
run: |
if [ `ls -1q "sample/storage/logs/" | wc -l` -gt 0 ]; then
for logfile in sample/storage/logs/*; do
echo "-- $logfile --"
cat $logfile
done
exit 1
fi
+28 -24
View File
@@ -7,13 +7,13 @@ on:
pull_request:
branches:
- "*"
schedule:
- cron: '0 0 * * *'
jobs:
php-tests:
runs-on: ${{ matrix.os }}
timeout-minutes: 15
env:
COMPOSER_NO_INTERACTION: 1
@@ -22,36 +22,40 @@ jobs:
matrix:
os: [ubuntu-latest]
php: [8.5, 8.4, 8.3, 8.2]
laravel: [~11.15, 12.x]
laravel: [12.x, 13.x, ~11.15]
stability: [prefer-lowest, prefer-stable]
include:
- os: windows-latest
php: 8.3
laravel: 12.x
stability: prefer-stable
exclude:
- laravel: 13.x
php: 8.2
steps:
- name: Set git to use LF
if: ${{ matrix.os == 'windows-latest' }}
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Set git to use LF
if: "${{ matrix.os == 'windows-latest' }}"
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout code
uses: actions/checkout@v6
- name: Checkout code
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: pdo_sqlite, fileinfo
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: pdo_sqlite, fileinfo
- name: Install dependencies
run: |
composer remove vimeo/psalm --no-update --dev
composer remove friendsofphp/php-cs-fixer --no-update --dev
composer require "laravel/framework:${{ matrix.laravel }}" --no-update --no-progress
composer update --prefer-dist --no-progress --${{ matrix.stability }}
- name: Install dependencies
run: |
composer remove vimeo/psalm --no-update --dev
composer remove friendsofphp/php-cs-fixer --no-update --dev
composer require "laravel/framework:${{ matrix.laravel }}" --no-update --no-progress
composer update --prefer-dist --no-progress --${{ matrix.stability }}
- name: Execute Unit Tests
run: composer test-ci
- name: Execute Unit Tests
run: composer test-ci
+9 -9
View File
@@ -25,21 +25,21 @@
"ext-json": "*",
"barryvdh/reflection-docblock": "^2.4",
"composer/class-map-generator": "^1.0",
"illuminate/console": "^11.15 || ^12",
"illuminate/database": "^11.15 || ^12",
"illuminate/filesystem": "^11.15 || ^12",
"illuminate/support": "^11.15 || ^12"
"illuminate/console": "^11.15 || ^12 || ^13.0",
"illuminate/database": "^11.15 || ^12 || ^13.0",
"illuminate/filesystem": "^11.15 || ^12 || ^13.0",
"illuminate/support": "^11.15 || ^12 || ^13.0"
},
"require-dev": {
"ext-pdo_sqlite": "*",
"friendsofphp/php-cs-fixer": "^3",
"illuminate/config": "^11.15 || ^12",
"illuminate/view": "^11.15 || ^12",
"illuminate/config": "^11.15 || ^12 || ^13.0",
"illuminate/view": "^11.15 || ^12 || ^13.0",
"larastan/larastan": "^3.1",
"mockery/mockery": "^1.4",
"orchestra/testbench": "^9.2 || ^10",
"orchestra/testbench": "^9.2 || ^10 || ^11.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpunit/phpunit": "^10.5 || ^11.5.3",
"phpunit/phpunit": "^10.5 || ^11.5.3 || ^12.5.12",
"spatie/phpunit-snapshot-assertions": "^4 || ^5",
"vlucas/phpdotenv": "^5"
},
@@ -86,7 +86,7 @@
"php-cs-fixer fix --config=.php-cs-fixer.tests.php"
],
"test": "phpunit",
"test-ci": "phpunit -d --without-creating-snapshots",
"test-ci": "phpunit",
"test-regenerate": "phpunit -d --update-snapshots"
}
}