v4.16.1 refines the v4.16.0 laravel/ai and MissingView work: exempts annotated prompt guards from TaintedLlmPrompt, extends MissingView to mailables, and fixes a Redis facade regression.
Features
- 🛡️ Exempt
laravel/aimiddleware guards annotated with@psalm-taint-escape llm_promptfromTaintedLlmPrompt, so a blocking prompt-injection guard (e.g.promptphp/intercept) silences the finding at its dispatchedhandle()/__invoke()method (#1441)final class PromptInjectionGuard { /** @psalm-taint-escape llm_prompt */ public function handle(AgentRequest $request, Closure $next) { /* ... */ } } // agent's middleware() resolves to [PromptInjectionGuard::class] // TaintedLlmPrompt no longer fires on prompts passing through it
Fixes
- Detect missing views in
Mailables\Contentconstructors and extendMissingViewtoMailable::view()/markdown()/text()and viewFactory::composer()/creator()(#1431, #1432)new Content(view: 'emials.welcome'); -// before: no issue +// now: MissingView: View 'emials.welcome' not found in any of the registered view paths
- Type
Redis::pipeline()/transaction()callback results aslist<mixed>instead of reportingUndefinedMagicMethod(#1427)Redis::pipeline(fn ($pipe) => $pipe->get('key')); -// before: UndefinedMagicMethod: Magic method Illuminate\Support\Facades\Redis::pipeline does not exist +// now: list<mixed> - Mark Eloquent relationship, command
handle(), and controller-action return values as framework-consumed, fixing spuriousPossiblyUnusedReturnValueunder--find-unused-code(#1434)
Full Changelog: v4.16.0...v4.16.1