Collection type inference for arbitrary inputs, and partial Laravel boots now surface instead of failing silently, plus three false-positive fixes around query builders and monorepo init already shipped on the 4.x line.
This release bumps min supported Laravel minor versions:
- ^12.4 to ^12.14
- ^13.0 to ^13.3
Features
- Infer
collect(),Collection::make(), andLazyCollection::make()return types for arbitrary inputs, not just arrays (#1225)
collect('hello');
-// InvalidArgument (before): string wasn't Arrayable|iterable|null
+// now infers: Collection<0, 'hello'>
collect(BackedSuit::Hearts);
-// InvalidArgument (before): enum cases weren't accepted either
+// now infers: Collection<0, BackedSuit>
collect(null);
-// before: Collection<array-key, mixed> (unbound fallback)
+// now infers: Collection<never, never>Fixes
- Fix false
UndefinedMagicMethodon custom Eloquent builder subclass methods called after a fluent chain (#1219) - Fix false
UndefinedMagicMethodonIndexDefinitionmodifiers in database migrations (#1220) - Fix
psalm-laravel initon monorepos: no longer putspackages/into<ignoreFiles>, which silently disabled analysis of package sources (#1214) - Surface swallowed
bootstrap()failures: a partial Laravel boot now emits a warning by default, and fails the run underfailOnInternalError(#1226)
Full Changelog: v3.14.10...v3.14.11