Support Laravel 13#228
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis PR upgrades Winter CMS Storm to require PHP 8.3 minimum, updates CI workflows and composer dependencies to match, refines PHPDoc type annotations to document Eloquent Builder generics consistently across Preferences and relation factories, implements lazy initialization for ArraySource SQLite connections to defer boot until first use, adjusts DownCommand payload generation logic, removes four now-resolved PHPStan baseline suppressions, and updates test expectations for scheduled call output formatting. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
415c0c6 to
0156a54
Compare
Builds on the Laravel 12 work (wintercms#207). Bumps to laravel/framework ^13, PHP ^8.3, tinker ^3, carbon ^3.8.4, symfony ^7.4|^8.0, testbench ^11 (PHPUnit kept at ^11.5.50 pending phpunit 12 support in test helpers). Code: defer ArraySource datasource setup out of the model boot cycle (L13 forbids instantiating a model while booting); restate Builder<Model> param on HasRelationships relation factories; fix Preferences::findRecord() scope typing; drop the unsupported 2nd arg to DownCommand option('status'); update schedule:list invokable-class test expectation; prune stale phpstan baseline entries; CI matrices to PHP 8.3/8.4.
0156a54 to
743afcd
Compare
Builds on #207 (Laravel 12 support), continuing the 1.3 development line. This PR adds Laravel 13 support on top of the Laravel 12 work.
Required by wintercms/winter#1487 (WinterCMS Laravel 13 support).
Summary
Targets Laravel 13 (released 2026-03-17). Storm re-implements/overrides a number of framework internals, so this covers the framework-level deltas in addition to the dependency bumps.
Dependency changes (
composer.json)php^8.2→^8.3(Laravel 13 minimum)laravel/framework^12.30.1→^13.0laravel/tinker^2.8.1→^3.0nesbot/carbon^3.0→^3.8.4symfony/console,symfony/process,symfony/yaml→^7.4|^8.0orchestra/testbench^10.0→^11.0phpunit/phpunit^11.0→^11.5.50(Laravel 13 + testbench 11 accept PHPUnit 11.5.50; kept on 11.x becausemeyfa/phpunit-assert-gdanddms/phpunit-arraysubset-assertsdo not yet support PHPUnit 12)Code changes
ArraySourcetrait — Laravel 13 throws aLogicExceptionwhen a model is instantiated while it is still booting.bootArraySource()previously didnew static(andstatic::insert(), which also instantiates) during boot. The datasource setup is now deferred and performed lazily on the firstresolveConnection()call, by which point the model has finished booting.HasOne,HasMany,HasOneThrough,HasManyThrough,BelongsTo,MorphTo,MorphOne,BelongsToMany,MorphToMany) — added@template/@extendsgenerics mirroring Laravel 13's relation generics so theBuilder<TRelatedModel>passed byHasRelationshipsmatches the relation constructors (fixes PHPStan covariance errors).Foundation/Console/DownCommand—option('status', 503)passed an unsupported 2nd argument toCommand::option(); the default is already defined by the parentdowncommand, so the stray argument was removed.Auth/Models/Preferences::findRecord()— corrected the scope typing so it returnsself|nullrather thanstdClass|null.tests/Scheduling/ScheduleListCommandTest— updated the expectedschedule:listoutput for an invokable class passed to->call()(modern Laravel renders the bare class name, without theClosure at:prefix).phpstan-baseline.neon— removed now-stale entries for errors that no longer occur on Laravel 13.CI
tests.ymlmatrix: dropped PHP 8.2 →['8.3', '8.4']code-analysis.yaml/code-quality.yaml: PHP8.2→8.3Testing
composer test(PHPUnit): green (711 tests, 0 failures, 0 errors)composer analyze(PHPStan level 5): 0 errorscomposer sniff(PHPCS): cleanRelated WinterCMS Laravel 13 PRs