Skip to content

Add Laravel 13 compatibility#496

Open
zoispag wants to merge 2 commits intorenoki-co:masterfrom
kyosenergy:laravel-13
Open

Add Laravel 13 compatibility#496
zoispag wants to merge 2 commits intorenoki-co:masterfrom
kyosenergy:laravel-13

Conversation

@zoispag
Copy link
Copy Markdown

@zoispag zoispag commented Mar 30, 2026

Summary

  • Adds ^13.0 to illuminate/macroable and illuminate/support version constraints
  • Adds ^11.0 to orchestra/testbench (testbench 11 targets Laravel 13)
  • Adds ^12.0|^13.0 to phpunit/phpunit (testbench 11 requires PHPUnit ≥11.5.50)
  • Adds "13.*" to the CI matrix with the corresponding testbench: "11.*" mapping, including PHP 8.5 explicit entries

Note: orchestra/testbench v11 requires PHP ≥8.3, so Laravel 13 test jobs will only run on PHP 8.3+.

Summary by Sourcery

Add compatibility with Laravel 13 and its testing stack and update CI to cover the new supported versions.

New Features:

  • Support Laravel 13 via updated illuminate/macroable and illuminate/support constraints.

Enhancements:

  • Expand dev dependency constraints to include orchestra/testbench 11 and PHPUnit 12–13 for newer Laravel support.

CI:

  • Extend the GitHub Actions matrix to run tests against Laravel 13 with the appropriate Testbench 11 mapping, including PHP 8.5 job variants.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Mar 30, 2026

Reviewer's Guide

Adds Laravel 13 compatibility by broadening framework and testing dependency constraints and extending the CI matrix to cover Laravel 13 with the appropriate Testbench and PHP combinations, including PHP 8.5-specific jobs.

File-Level Changes

Change Details Files
Broaden runtime dependency constraints to support Laravel 13 components.
  • Extend illuminate/macroable version constraint to include ^13.0 while retaining 11 and 12 support
  • Extend illuminate/support version constraint to include ^13.0 while retaining 11 and 12 support
composer.json
Broaden dev dependency constraints for Testbench and PHPUnit to support Laravel 13’s testing stack.
  • Allow orchestra/testbench ^11.0 in addition to existing ^9.0 and ^10.6.0 constraints
  • Allow phpunit/phpunit ^12.0 and ^13.0 in addition to existing ^10.0 and ^11.5 constraints, aligning with Testbench 11 requirements
composer.json
Extend CI matrix to run against Laravel 13 with matching Testbench and PHP combinations, including explicit PHP 8.5 coverage.
  • Add Laravel 13 ("13.") to the main Laravel version matrix
  • Map Laravel 13 matrix entries to orchestra/testbench 11.
  • Add explicit PHP 8.5 matrix include rows for Laravel 13 across supported Kubernetes versions and prefer-lowest/prefer-stable variations
.github/workflows/ci.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ce2ef320-6d02-4745-9ec3-89a4ce12dfac

📥 Commits

Reviewing files that changed from the base of the PR and between 1c5b87e and a8c6d9a.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Composer Dependency Updates

Expanded version constraints to enable Laravel 13 testing:

  • illuminate/macroable: ^11.0|^12.0|^13.0 (added ^13.0)
  • illuminate/support: ^11.0|^12.0|^13.0 (added ^13.0)
  • orchestra/testbench (require-dev): ^9.0|^10.6.0|^11.0 (added ^11.0)
  • phpunit/phpunit (require-dev): ^10.0|^11.5|^12.0|^13.0 (added ^12.0|^13.0)

Notes / blunt take:

  • Composer root still requires "php": "^8.2". That doesn't prevent adding Testbench 11 in require-dev, but Testbench 11 requires PHP ≥ 8.3 — so developers running installs on a system strictly limited to PHP 8.2 may hit platform conflicts when trying to install Testbench 11 locally. The CI avoids that by excluding PHP 8.2 + Laravel 13 combinations (see CI changes below).

CI Workflow Updates

  • Added Laravel 13.* to the GitHub Actions matrix with testbench: 11.* mapping.
  • Matrix php versions declared: 8.2, 8.3, 8.4; explicit php: 8.5 jobs are added via matrix includes for Laravel 12 and 13 across Kubernetes versions 1.32.9, 1.33.5, 1.34.1 and both composer strategies (prefer-lowest, prefer-stable).
  • Excluded the invalid combination of php: "8.2" with laravel: "13.*" so Laravel 13 jobs only run on PHP 8.3+ (consistent with Testbench 11's PHP ≥ 8.3 requirement).
  • Composer install step uses the matrix interpolation to require the matching laravel/framework and orchestra/testbench versions, then runs composer update with the chosen prefer mode.

Practical implications / realistic risks:

  • CI now runs Laravel 13 tests only on PHP 8.3+; local developers on PHP 8.2 may be unable to run Laravel 13 tests without upgrading PHP or using a separate environment.
  • The repository's composer "php": "^8.2" claim is slightly misleading given Testbench 11's PHP ≥ 8.3 requirement — consider tightening or documenting platform requirements or adding a composer.platform check in CI to avoid confusion.
  • No source code/API changes; only dependency constraints and CI workflow matrix were modified.

Lines changed (summary): composer.json +4/-4, .github/workflows/ci.yml +37/-1
Estimated review effort: Medium (CI matrix complexity + dependency compatibility considerations)

Walkthrough

Adds Laravel 13.* to CI and composer constraints. CI matrix in .github/workflows/ci.yml now includes Laravel 13.* tested on PHP 8.5 (excluding php:8.2) across Kubernetes versions 1.32.9, 1.33.5, and 1.34.1 with both prefer-lowest and prefer-stable; corresponding Testbench set to 11.*. composer.json dependency constraints expanded to allow illuminate/macroable, illuminate/support ^13.0, orchestra/testbench ^11.0, and broader phpunit/phpunit versions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add Laravel 13 compatibility' directly and clearly summarizes the main objective of the pull request, which is to add support for Laravel 13.
Description check ✅ Passed The description is detailed and directly related to the changeset, covering all modifications: dependency version constraints, testbench updates, phpunit changes, and CI matrix configuration for Laravel 13.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The PHP 8.5 / Laravel 13 matrix entries are very repetitive; consider using exclude/include more sparingly (or a separate job/matrix for 8.5) to avoid listing every combination explicitly and keep the workflow easier to maintain.
  • Broadening phpunit/phpunit to ^12.0|^13.0 for all environments may create composer-resolution conflicts with older orchestra/testbench versions; consider tightening the PHPUnit constraints per Testbench major (or adding conflict rules) so older Laravel/Testbench combinations don’t accidentally pull unsupported PHPUnit majors.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The PHP 8.5 / Laravel 13 matrix entries are very repetitive; consider using `exclude`/`include` more sparingly (or a separate job/matrix for 8.5) to avoid listing every combination explicitly and keep the workflow easier to maintain.
- Broadening `phpunit/phpunit` to `^12.0|^13.0` for all environments may create composer-resolution conflicts with older `orchestra/testbench` versions; consider tightening the PHPUnit constraints per Testbench major (or adding `conflict` rules) so older Laravel/Testbench combinations don’t accidentally pull unsupported PHPUnit majors.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the dependency constraints in composer.json to include support for Illuminate v13, Orchestra Testbench v11, and PHPUnit v12 and v13. A review comment suggests relaxing the PHPUnit v11 constraint from ^11.5 to ^11.0 to maintain compatibility with Orchestra Testbench's own requirements and avoid potential version conflicts for users.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 23-34: The job matrix currently generates incompatible
combinations (e.g., php "8.2" with laravel "13.*" / testbench "11.*"); add an
exclude entry to the matrix to remove php: "8.2" when laravel: "13.*" (and any
matching testbench 11.*) so those combinations are not run. Update the matrix
block (keys: php, laravel, include) to add an exclude array that references php
and laravel (and testbench if present) to explicitly exclude php "8.2" + laravel
"13.*" (and associated testbench 11.*) from the generated matrix.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 543bf489-0989-4b5d-b6a2-7072418f2ff9

📥 Commits

Reviewing files that changed from the base of the PR and between 609ba22 and 1c5b87e.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • composer.json

@dimoschi
Copy link
Copy Markdown

dimoschi commented Apr 2, 2026

Any chance you can have this released. Laravel 12 and 13 are already tested in the GH workflow, so it shouldn't be a problem. Laravel is notorious for being backwards compatible.

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.

2 participants