Skip to content

[4.x] Laravel 13.24 support (fix #1474) - #1476

Merged
stancl merged 1 commit into
masterfrom
push-wzuqzkwtxtqo
Aug 5, 2026
Merged

[4.x] Laravel 13.24 support (fix #1474)#1476
stancl merged 1 commit into
masterfrom
push-wzuqzkwtxtqo

Conversation

@stancl

@stancl stancl commented Aug 5, 2026

Copy link
Copy Markdown
Member
  • We conditionally use either $signature + specifyParameters() in the
    newer versions or just $name in the older versions. There doesn't
    appear to be a single solution that'd work in both versions, likely
    having to do with the constructor override in the trait and how the
    specifyParameters() method behaves differently in this class between
    versions
  • Remove unnecessary options from the Run command (the trait adds those)
  • Not directly related: make HasTenantOptions accept ...$args
  • Unrelated: remove phpstan ignore in TenancyServiceProvider

Summary by CodeRabbit

  • Bug Fixes
    • Updated tenant-related commands for compatibility with newer Laravel versions.
    • Simplified the tenants:run command interface by removing tenant selection options.
    • Preserved tenant selection behavior during command execution.
    • Improved command initialization across supported framework versions.
    • Ensured tenant option handling remains consistent when commands receive additional parameters.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 712c0103-0e74-4767-a157-00c10dfd8ac3

📥 Commits

Reviewing files that changed from the base of the PR and between 553f57a and f5f5a44.

📒 Files selected for processing (4)
  • src/Commands/Run.php
  • src/Commands/Seed.php
  • src/Concerns/HasTenantOptions.php
  • src/TenancyServiceProvider.php

📝 Walkthrough

Walkthrough

The changes update tenant command signatures, Laravel-version-specific command construction, constructor argument forwarding, and a PHPStan suppression in the tenancy service provider.

Changes

Tenant command compatibility

Layer / File(s) Summary
Tenant command signatures
src/Commands/Run.php, src/Commands/Seed.php
The tenants:run signature removes the --tenants and --skip-tenants options. Seed configures its signature by Laravel version.
Constructor argument forwarding
src/Concerns/HasTenantOptions.php
HasTenantOptions accepts variadic constructor arguments and forwards them to the parent constructor.
Static analysis cleanup
src/TenancyServiceProvider.php
The PHPStan suppression is removed from the database driver creation call. Runtime behavior is unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: lukinovec

Poem

A rabbit reviews commands with care,
Run has fewer options to declare.
Seed hops across versions bright,
Arguments pass through just right.
PHPStan rests beneath moonlight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: adding Laravel 13.24 support for issue #1474.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch push-wzuqzkwtxtqo

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.

@stancl
stancl force-pushed the push-wzuqzkwtxtqo branch from 6f4e6fc to e38dfb7 Compare August 5, 2026 02:51
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/Commands/Seed.php`:
- Around line 21-33: Update the constructor logic in the command class so the
Laravel 13.24+ branch only assigns the signature, removes the
specifyParameters() call, and then invokes parent::__construct($resolver) after
the version-specific setup. Preserve the legacy branch’s name assignment and
ensure the parent initializes parameters from the signature without redefining
the database option.
🪄 Autofix

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 Plus

Run ID: 0b0f723e-1713-421f-b9c6-2d2539008068

📥 Commits

Reviewing files that changed from the base of the PR and between 553f57a and e38dfb7.

📒 Files selected for processing (4)
  • src/Commands/Run.php
  • src/Commands/Seed.php
  • src/Concerns/HasTenantOptions.php
  • src/TenancyServiceProvider.php

Comment thread src/Commands/Seed.php Outdated
- We conditionally use either $signature + specifyParameters() in the
  newer versions or just $name in the older versions. There doesn't
  appear to be a single solution that'd work in both versions, likely
  having to do with the constructor override in the trait and how the
  specifyParameters() method behaves differently in this class between
  versions
- Remove unnecessary options from the Run command (the trait adds those)
- Not directly related: make HasTenantOptions accept ...$args
- Unrelated: remove phpstan ignore in TenancyServiceProvider
@stancl
stancl force-pushed the push-wzuqzkwtxtqo branch from e38dfb7 to f5f5a44 Compare August 5, 2026 03:38
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

stancl added a commit that referenced this pull request Aug 5, 2026
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.65%. Comparing base (553f57a) to head (f5f5a44).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1476      +/-   ##
============================================
+ Coverage     86.63%   86.65%   +0.02%     
- Complexity     1219     1220       +1     
============================================
  Files           186      186              
  Lines          3583     3589       +6     
============================================
+ Hits           3104     3110       +6     
  Misses          479      479              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stancl
stancl merged commit e0990a4 into master Aug 5, 2026
14 checks passed
@stancl
stancl deleted the push-wzuqzkwtxtqo branch August 5, 2026 03:49
stancl added a commit that referenced this pull request Aug 5, 2026
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