Add support for Laravel 11, 12 and PHP 8.3, 8.4#2
Add support for Laravel 11, 12 and PHP 8.3, 8.4#2johnnyhawley wants to merge 1 commit intoakaunting:masterfrom
Conversation
- Update composer.json to allow laravel/framework ^11.0|^12.0, orchestra/testbench ^9.0|^10.0, and phpunit/phpunit ^11.0 - Update phpunit.xml to use <source> instead of deprecated <coverage> for PHPUnit 10/11 compatibility - Expand CI matrix with PHP 8.3/8.4 and Laravel 11/12, update actions/checkout to v4, and exclude incompatible version combinations https://claude.ai/code/session_01L2WZJs1DM2BpHrCqKFPtVC
There was a problem hiding this comment.
Pull request overview
This PR extends Laravel and PHP version support for the akaunting/laravel-sortable package, adding compatibility with Laravel 11, 12 and PHP 8.3, 8.4 while maintaining backward compatibility with Laravel 9, 10.
Changes:
- Added PHP 8.3 and 8.4 to the test matrix and updated dependencies to support PHPUnit 11
- Added Laravel 11 (with Testbench 9) and Laravel 12 (with Testbench 10) support
- Modernized test infrastructure by updating GitHub Actions checkout from v2 to v4 and migrating PHPUnit configuration from deprecated
<coverage>to<source>element
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| phpunit.xml | Migrated from deprecated <coverage> element to <source> for PHPUnit 10+ compatibility |
| composer.json | Added Laravel 11/12, PHPUnit 11, and Testbench 9/10 to dependency constraints |
| .github/workflows/tests.yml | Extended test matrix with PHP 8.3/8.4 and Laravel 11/12, added appropriate version exclusions, and updated checkout action to v4 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - laravel: 12.* | ||
| php: '8.0' | ||
| - laravel: 12.* | ||
| php: '8.1' |
There was a problem hiding this comment.
Potential missing exclusion for Laravel 12 with PHP 8.2. The PR description states "Laravel 12 requires PHP 8.3+" but the test matrix only excludes PHP 8.0 and 8.1 for Laravel 12, which would allow testing with PHP 8.2. This creates a discrepancy between the documented requirements and the actual test matrix.
If Laravel 12 truly requires PHP 8.3+, add an exclusion for PHP 8.2. If Laravel 12 actually supports PHP 8.2+, the current exclusions are correct, but the PR description should be updated to reflect this.
Summary
This PR extends the package to support the latest versions of Laravel and PHP, ensuring compatibility with modern Laravel applications while maintaining support for earlier versions.
Key Changes
composer.jsonto allow Laravel 11 and 12, PHPUnit 11, and Testbench 9 and 10phpunit.xmlto use<source>instead of deprecated<coverage>elementImplementation Details