Skip to content

Add support for Laravel 11, 12 and PHP 8.3, 8.4#2

Open
johnnyhawley wants to merge 1 commit intoakaunting:masterfrom
johnnyhawley:claude/laravel-11-12-support-UrehQ
Open

Add support for Laravel 11, 12 and PHP 8.3, 8.4#2
johnnyhawley wants to merge 1 commit intoakaunting:masterfrom
johnnyhawley:claude/laravel-11-12-support-UrehQ

Conversation

@johnnyhawley
Copy link

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

  • PHP Support: Added PHP 8.3 and 8.4 to the test matrix
  • Laravel Support: Added Laravel 11.* and 12.* to the supported versions
  • Testbench: Updated testbench versions to match Laravel releases (9.* for Laravel 11, 10.* for Laravel 12)
  • Dependencies: Updated composer.json to allow Laravel 11 and 12, PHPUnit 11, and Testbench 9 and 10
  • CI/CD: Updated GitHub Actions checkout action from v2 to v4
  • Test Configuration: Updated phpunit.xml to use <source> instead of deprecated <coverage> element

Implementation Details

  • Configured appropriate version exclusions in the test matrix to respect minimum PHP version requirements for each Laravel version (e.g., Laravel 9 requires PHP 8.0+, Laravel 11 requires PHP 8.2+, Laravel 12 requires PHP 8.3+)
  • Maintained backward compatibility with Laravel 9 and 10 while adding forward compatibility with newer versions
  • Updated PHPUnit configuration to align with modern PHPUnit standards

- 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
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +38 to +41
- laravel: 12.*
php: '8.0'
- laravel: 12.*
php: '8.1'
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants