Requires vimeo/psalm ^7.12.0, and a nullable Request::route().
Fixes
- Type
Request::route()without arguments asRoute|null: Laravel returnsnullwhen no route matched (error pages, console, queued code). Guards on it no longer report redundant checks, and an unguarded call reportsPossiblyNullReference(#2367)
$name = request()->route()?->getName();
-// RedundantConditionGivenDocblockType: Docblock-defined type Illuminate\Routing\Route for $__tmp_nullsafe__N is never null
+// string|null- Blade: stop reporting
PossiblyUndefinedGlobalVariableon$__sessionPrevious/$__contextPreviousin templates with consecutive@sessionor@contextblocks on Psalm 7.12 (#2369)
Full Changelog: v4.22.4...v4.22.5