This patch sharpens conditional return types for several Laravel helpers and guards against two crash paths during partial app bootstrap.
Fixes
- Add conditional return types for
Pagination::fragment(),Arr::random(), andLottery::choose()(#1176) - Use a conditional return type for
Route::domain()so it narrows$thisvs string (#1174) - Remap the value type in
Paginator::through()to the updated template after the callback (#1173) - Guard
migratorresolution so analysis no longer crashes when the app bootstraps partially (#1175) - Prevent a crash when a container binding resolves to an over-long string (#1179)
- Forward CLI flags from
psalm-laravel analyzethrough to psalm CLI (#1158)
Full Changelog: v4.14.4...v4.14.5