You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After composer update to Laravel v11.33.0 i got this error
@php artisan package:discover --ansi Symfony\Component\ErrorHandler\Error\FatalError Declaration of FumeApp\ModelTyper\Commands\ShowModelCommand::handle() must be compatible with Illuminate\Database\Console\ShowModelCommand::handle(Illuminate\Database\Eloquent\ModelInspector $modelInspector) at vendor\fumeapp\modeltyper\src\Commands\ShowModelCommand.php:31 27▕ 28▕ /** 29▕ * @override 30▕ */ ➜ 31▕ public function handle() 32▕ { 33▕ // Override default console component factory to force parent command to return failed exit code on error. 34▕ $this->components = new ErrorEmittingConsoleComponentFactory($this->components, $this->option('throw-exceptions')); // @phpstan-ignore-line 35▕
looks like Laravel upgrade Illuminate\Database\Console\ShowModelCommand to extract its functionality to separate class in #53541
for now adding Illuminate\Database\Eloquent\ModelInspector to the handle method works just fine for install, command runs ok, dont know if this works ErrorEmittingConsoleComponentFactory
I think a new version V3 would be good, drop the old ModelInterface::class, drop laravel < 11.33, upgrade larastan@v3/phpstan@v2 and implement the new ModelInspector::class instead off overriding the base ShowModelCommand::class
Thanks for reporting @ayrtonandino
I like the v3 idea! but its not something I can promise to get too soon, but feel free to PR something and I can review it!
What happened?
After composer update to Laravel v11.33.0 i got this error
looks like Laravel upgrade
Illuminate\Database\Console\ShowModelCommand
to extract its functionality to separate class in #53541for now adding
Illuminate\Database\Eloquent\ModelInspector
to the handle method works just fine for install, command runs ok, dont know if this worksErrorEmittingConsoleComponentFactory
Expected Behavior
No response
Steps To Reproduce
init new laravel >=11.33 project
install modeltyper
get composer error
The text was updated successfully, but these errors were encountered: