-
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Describe the bug
Larastan reports a “Call to an undefined method” error on a class or interface that doesn’t natively provide that method.
------ ------------------------------------------------------------------------------------
Line Http/Controllers/Image/ImageController.php
------ ------------------------------------------------------------------------------------
:82 Call to an undefined method Illuminate\Contracts\Routing\ResponseFactory::image().
🪪 method.notFound
------ ------------------------------------------------------------------------------------
Code Example
Yeah, simply add this to controller.
return response()->image(
$image,
$format,
quality: 90,
);
Expected behavior
PHPStan/Larastan should recognize dynamically added methods if properly documented.
Environment :
- PHP Version: PHP 8.3.21 (cli) (built: May 21 2025 23:17:35) (NTS)
- OS: MacOS 15.4.1 (24E263)
- Intervention Image Version: 1.5.6
- GD or Imagick: GD
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
