yoeunes / toastr

:eyes: toastr.js notifications for Laravel
https://php-flasher.io
MIT License
374 stars 53 forks source link

Error Installing/Update toastr in Laravel 11 #46

Open makuguren opened 4 months ago

makuguren commented 4 months ago

I am using Laravel 11 and I'm currently faced this issue when Installing toastr.

Here's the Error. Could fix the error as soon as Possible.

Symfony\Component\ErrorHandler\Error\FatalError

Declaration of Flasher\Laravel\Command\InstallCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int

at vendor\php-flasher\flasher-laravel\Command\InstallCommand.php:35 PHP Fatal error: Declaration of Flasher\Laravel\Command\InstallCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int in C:\Users\Makuguren\Documents\CAPSTONE PROJECT\PiLock-Admin-Laravel-10-2\vendor\php-flasher\flasher-laravel\Command\InstallCommand.php on line 35 31▕ 32▕ /* 33▕ @return int 34▕ */ ➜ 35▕ protected function execute(InputInterface $input, OutputInterface $output) 36▕ { 37▕ $output->writeln(''); 38▕ $output->writeln(' 39▕ ██████╗ ██╗ ██╗██████╗ ███████╗██╗ █████╗ ███████╗██╗ ██╗███████╗██████╗

Whoops\Exception\ErrorException

Declaration of Flasher\Laravel\Command\InstallCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int

at vendor\php-flasher\flasher-laravel\Command\InstallCommand.php:35 31▕ 32▕ /* 33▕ @return int 34▕ */ ➜ 35▕ protected function execute(InputInterface $input, OutputInterface $output) 36▕ { 37▕ $output->writeln(''); 38▕ $output->writeln(' 39▕ ██████╗ ██╗ ██╗██████╗ ███████╗██╗ █████╗ ███████╗██╗ ██╗███████╗██████╗

1 vendor\filp\whoops\src\Whoops\Run.php:510 Whoops\Run::handleError("Declaration of Flasher\Laravel\Command\InstallCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int", "C:\Users\Makuguren\Documents\CAPSTONE PROJECT\PiLock-Admin-Laravel-10-2\vendor\php-flasher\flasher-laravel\Command\InstallCommand.php")

2 [internal]:0 Whoops\Run::handleShutdown()

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255

yoeunes commented 4 months ago

Hello, sorry for this error, can you please upgrade to v2.3.5 and check if this solve the issue ?