packagist psalm/plugin-laravel v4.16.1

5 hours ago

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/ai middleware guards annotated with @psalm-taint-escape llm_prompt from TaintedLlmPrompt, so a blocking prompt-injection guard (e.g. promptphp/intercept) silences the finding at its dispatched handle()/__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\Content constructors and extend MissingView to Mailable::view()/markdown()/text() and view Factory::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 as list<mixed> instead of reporting UndefinedMagicMethod (#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 spurious PossiblyUnusedReturnValue under --find-unused-code (#1434)

Full Changelog: v4.16.0...v4.16.1

Don't miss a new plugin-laravel release

NewReleases is sending notifications on new releases.