Skip to content

Laravel 13.x Compatibility#154

Open
laravel-shift wants to merge 2 commits intoimanghafoori1:masterfrom
laravel-shift:l13-compatibility
Open

Laravel 13.x Compatibility#154
laravel-shift wants to merge 2 commits intoimanghafoori1:masterfrom
laravel-shift:l13-compatibility

Conversation

@laravel-shift
Copy link
Contributor

@laravel-shift laravel-shift commented Mar 5, 2026

This is an automated pull request from Shift to update your package code and dependencies to be compatible with Laravel 13.x.

Before merging, you need to:

  • Checkout the l13-compatibility branch
  • Review all comments for additional changes
  • Thoroughly test your package

If you do find an issue, please report it by commenting on this PR to help improve future automation.

Summary by Sourcery

Add Laravel 13 compatibility to the package and its CI matrix.

New Features:

  • Declare compatibility with Laravel 13 in the package dependencies.

CI:

  • Extend the test workflow matrix to run against Laravel 13 with appropriate PHP version exclusions.

Summary by CodeRabbit

  • Tests

    • Extended test matrix to include Laravel 13.x with appropriate PHP version compatibility rules.
  • Chores

    • Updated framework support requirements to include Laravel 13 compatibility.

@laravel-shift
Copy link
Contributor Author

⚠️ Shift detected a dependency for the laravel/framework. Unless you have a special requirement for depending on the entire Laravel framework, it's recommended to add dependencies for the specific illuminate packages instead.

@laravel-shift
Copy link
Contributor Author

⚠️ Shift detected GitHub Actions which run jobs using a version matrix. Shift attempted to update your configuration for Laravel 13. However, you should review these changes to ensure the desired combination of versions are built for your package.

@sourcery-ai
Copy link

sourcery-ai bot commented Mar 5, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates package constraints and CI test matrix to add compatibility and coverage for Laravel 13 while excluding unsupported PHP/Laravel combinations.

Flow diagram for version compatibility with Laravel 13

graph TD
  Start["Start: select PHP and Laravel versions"] --> CheckPHP["Check PHP version"]

  CheckPHP -->|"PHP < 8.1"| OldCompat["Laravel 5.1 - 12.x only"]
  OldCompat --> EndOld["Laravel 13 not allowed"]

  CheckPHP -->|"PHP >= 8.1"| CheckLaravel["Check Laravel version"]

  CheckLaravel -->|"Laravel <= 12.x"| Compat12["Allowed by composer constraint ~5.1|6.*|7.*|8.*|9.*|10.*|11.*|12.*"]
  Compat12 --> End12["Use existing compatibility"]

  CheckLaravel -->|"Laravel 13.x"| Compat13["Allowed by new composer constraint ^13.0"]
  Compat13 --> End13["Run tests in CI matrix for Laravel 13"]

  CheckLaravel -->|"Laravel > 13.x"| NotAllowed["Not allowed by current constraints"]
  NotAllowed --> EndNA["Update constraints required"]
Loading

File-Level Changes

Change Details Files
Extend CI workflow matrix to run tests against Laravel 13 while excluding unsupported PHP versions for that Laravel release.
  • Add Laravel 13 to the GitHub Actions test matrix for all supported OS/PHP combinations.
  • Define exclusions to prevent running Laravel 13 against PHP 7.2, 7.3, 7.4, 8.0, 8.1, and 8.2 in the matrix.
.github/workflows/tests.yml
Update Composer dependency constraints to declare support for Laravel 13.
  • Extend laravel/framework version constraint to include ^13.0 alongside existing supported versions.
composer.json

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

@laravel-shift
Copy link
Contributor Author

⚗️ Using this package? If you would like to help test these changes or believe them to be compatible, you may update your project to reference this branch.

To do so, temporarily add Shift's fork to the repositories property of your composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/laravel-shift/laravel-heyman.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:

{
    "require": {
        "imanghafoori/laravel-heyman": "dev-l13-compatibility",
    }
}

Finally, run: composer update

@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

📝 Walkthrough

Walkthrough

The pull request expands Laravel 13.x support by updating the CI/CD test matrix to include Laravel 13 with PHP version exclusions, and extending the Laravel version constraint in composer.json to explicitly include Laravel 13.

Changes

Cohort / File(s) Summary
CI/CD Configuration
.github/workflows/tests.yml
Extended test matrix to include Laravel 13.x alongside existing versions, with added exclude rules preventing Laravel 13 tests on unsupported PHP 7.2–8.2 configurations.
Package Dependencies
composer.json
Updated Laravel framework version constraint from the existing specification to include |^13.0, broadening framework compatibility.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Hop, skip, and a jump to thirteen,
New Laravel versions bloom on the scene!
CI pipelines dance, matrices expand,
Supporting fresh frameworks across the land!
—CodeRabbit's furry friend 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Laravel 13.x Compatibility' directly and clearly describes the main objective of the pull request, which is to update the package for Laravel 13.x compatibility.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@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 found 1 issue, and left some high level feedback:

  • The test matrix adds Laravel 13.* but omits 12.*, which you still support in composer.json; consider including Laravel 12 in the workflow matrix or dropping it from the constraints.
  • For Laravel 13.*, you currently exclude only some PHP versions in the matrix; double‑check Laravel 13’s minimum PHP version and adjust the exclude list (or the PHP matrix) so you’re not running unsupported PHP/Laravel combinations.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The test matrix adds Laravel `13.*` but omits `12.*`, which you still support in `composer.json`; consider including Laravel 12 in the workflow matrix or dropping it from the constraints.
- For Laravel `13.*`, you currently exclude only some PHP versions in the matrix; double‑check Laravel 13’s minimum PHP version and adjust the `exclude` list (or the PHP matrix) so you’re not running unsupported PHP/Laravel combinations.

## Individual Comments

### Comment 1
<location path="composer.json" line_range="26" />
<code_context>
     "require": {
         "php": ">=7.1",
-        "laravel/framework": "~5.1|6.*|7.*|8.*|9.*|10.*|11.*|12.*"
+        "laravel/framework": "~5.1|6.*|7.*|8.*|9.*|10.*|11.*|12.*|^13.0"
     },
     "require-dev": {
</code_context>
<issue_to_address>
**issue (bug_risk):** Check PHP version constraint against Laravel 13 minimum requirements.

The `php` constraint is still `>=7.1`, but Laravel 13 will require a much higher PHP version (likely PHP 8+). This mismatch can let Composer install `laravel/framework:^13.0` on environments that satisfy `>=7.1` but can’t actually run Laravel 13. Please update the `php` constraint to at least Laravel 13’s minimum PHP version, or adjust the Laravel 13 constraint so they stay aligned.
</issue_to_address>

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.

"require": {
"php": ">=7.1",
"laravel/framework": "~5.1|6.*|7.*|8.*|9.*|10.*|11.*|12.*"
"laravel/framework": "~5.1|6.*|7.*|8.*|9.*|10.*|11.*|12.*|^13.0"
Copy link

Choose a reason for hiding this comment

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

issue (bug_risk): Check PHP version constraint against Laravel 13 minimum requirements.

The php constraint is still >=7.1, but Laravel 13 will require a much higher PHP version (likely PHP 8+). This mismatch can let Composer install laravel/framework:^13.0 on environments that satisfy >=7.1 but can’t actually run Laravel 13. Please update the php constraint to at least Laravel 13’s minimum PHP version, or adjust the Laravel 13 constraint so they stay aligned.

Copy link

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/tests.yml (1)

21-72: ⚠️ Potential issue | 🟠 Major

Add Laravel 12. to the test matrix; it is declared in composer.json but missing from the workflow.*

The composer.json declares support for Laravel 12.* (along with ~5.1|6.*|7.*|8.*|9.*|10.*|11.*|^13.0), but the CI matrix excludes it. Update the matrix to include this declared version:

Suggested matrix adjustment
-        laravel: ['6.*', '7.*', '8.*', '9.*', '10.*', '11.*', '13.*']
+        laravel: ['6.*', '7.*', '8.*', '9.*', '10.*', '11.*', '12.*', '13.*']
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/tests.yml around lines 21 - 72, The CI matrix is missing
Laravel 12.* despite composer.json declaring support; update the workflow's
matrix entry named "laravel" to include "12.*" alongside the existing versions
and ensure any relevant exclude blocks that mistakenly omit combinations with
php versions are adjusted (remove or add excludes referencing laravel: 12.* as
needed) so that valid PHP/Laravel combos for 12.* are tested; locate the
"laravel" matrix list and the "exclude" blocks in the tests workflow and add
"12.*" to the versions list and reconcile excludes to reflect supported PHP
versions for Laravel 12.*.
🧹 Nitpick comments (1)
composer.json (1)

26-26: Consider replacing laravel/framework with minimal illuminate/* requirements (optional).

This package uses components across multiple Illuminate subsystems (auth, routing, eloquent, events, validation, views, support). While technically feasible to split into individual illuminate/* dependencies, the full framework requirement is reasonable here since this is an application-level package designed to integrate deeply with Laravel, and consuming applications will have the full framework installed anyway. Refactoring to granular dependencies would add complexity to composer.json without meaningful benefit.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@composer.json` at line 26, Leave the "laravel/framework" dependency as-is in
composer.json (the current entry "laravel/framework":
"~5.1|6.*|7.*|8.*|9.*|10.*|11.*|12.*|^13.0") rather than refactoring to
individual illuminate/* packages; no code changes required—retain the full
framework requirement because this is an application-level integration and
consuming apps will provide the framework.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In @.github/workflows/tests.yml:
- Around line 21-72: The CI matrix is missing Laravel 12.* despite composer.json
declaring support; update the workflow's matrix entry named "laravel" to include
"12.*" alongside the existing versions and ensure any relevant exclude blocks
that mistakenly omit combinations with php versions are adjusted (remove or add
excludes referencing laravel: 12.* as needed) so that valid PHP/Laravel combos
for 12.* are tested; locate the "laravel" matrix list and the "exclude" blocks
in the tests workflow and add "12.*" to the versions list and reconcile excludes
to reflect supported PHP versions for Laravel 12.*.

---

Nitpick comments:
In `@composer.json`:
- Line 26: Leave the "laravel/framework" dependency as-is in composer.json (the
current entry "laravel/framework": "~5.1|6.*|7.*|8.*|9.*|10.*|11.*|12.*|^13.0")
rather than refactoring to individual illuminate/* packages; no code changes
required—retain the full framework requirement because this is an
application-level integration and consuming apps will provide the framework.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 65995a14-4878-4d12-bac9-7797f3f90fbb

📥 Commits

Reviewing files that changed from the base of the PR and between 9270bb5 and 5ffa1f1.

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

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.

1 participant