-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP Fatal error: Declaration of VladimirYuldashev\LaravelQueueRabbitMQ\Consumer::stop($status = 0): int must be compatible with Illuminate\Queue\Worker::stop($status = 0, $options = null) #499
Comments
At version 9.39.0 still working |
This change produce the error laravel/framework#45120 |
ok, I will set version of laravel 9.39 and I will wait when lib use new :P thanks anyway Only what u need to do is add options to function stop() in Consumer class
|
laravel 9.41.0 also works |
Is the pull request going live soon ? |
Me too. Laravel |
just stick to laravel <= 9.41.0 until the pull request is merged. or if you really need laravel > 9.41 simply force vyuldashev/laravel-queue-rabbitmq not to be updated in your composer.json and adjust the code as it is in this pull request until everything is merged |
doesn't work with "laravel/framework": "^9.19", |
How can i create a project with v9.41? I am trying to install but when i check the version it keeps "v9.43" |
@heylucasf, just run the |
In laravel/laravel project? (I am beginner) |
@heylucasf, just run the command and see |
Worked, thanks. |
any update? we have to use laravel 9.41 and cannot have the last laravel updated version because of this issue |
guys just make an override file and add it to compose.json at section autoload, it won't block u to update Lara |
@devzorg thanks for the tip! I've just test it and unlock laravel version updates in my composer |
@devzorg thank you! I will add little more details to your temporary solution to fix problem:
This solution tested with |
Add to composer.json, the below line. It will downgrade the worker to be compatible with the package, then once they fix the issue, remove it.
|
@vyuldashev it would be nice if you can review and merge one of the pull requests associated with this issue. |
you can use my laravel rabbitmq package |
Any solution for this? I thought upgrading to version 13 of the package would work, but the same error happens in the same place. Symfony\Component\ErrorHandler\Error\FatalError
Declaration of VladimirYuldashev\LaravelQueueRabbitMQ\Consumer::stop($status = 0): int must be compatible with Illuminate\Queue\Worker::stop($status = 0, $options = null)
at vendor/vladimir-yuldashev/laravel-queue-rabbitmq/src/Consumer.php:200
196▕ *
197▕ * @param int $status
198▕ * @return int
199▕ */
➜ 200▕ public function stop($status = 0): int
201▕ {
202▕ // Tell the server you are going to stop consuming.
203▕ // It will finish up the last message and not send you any more.
204▕ $this->channel->basic_cancel($this->consumerTag, false, true);
+26 vendor frames
27 artisan:37
App\Console\Kernel::handle("class Symfony\Component\Console\Input\ArgvInput { protected $definition = class Symfony\Component\Console\Input\InputDefinition { private array $arguments = [...]; private int $requiredCount = 0; private ?Symfony\Component\Console\Input\InputArgument $lastArrayArgument = NULL; private ?Symfony\Component\Console\Input\InputArgument $lastOptionalArgument = NULL; private array $options = [...]; private array $negations = [...]; private array $shortcuts = [...] }; protected $stream = NULL; protected $options = []; protected $arguments = []; protected $interactive = TRUE; private array $tokens = [0 => 'package:discover', 1 => '--ansi']; private array $parsed = *uninitialized* }", "class Symfony\Component\Console\Output\ConsoleOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter { private bool $decorated = TRUE; private array $styles = [...]; private Symfony\Component\Console\Formatter\OutputFormatterStyleStack $styleStack = class Symfony\Component\Console\Formatter\OutputFormatterStyleStack { ... } }; private ${Symfony\Component\Console\Output\StreamOutput}stream = resource(2) of type (stream); private Symfony\Component\Console\Output\OutputInterface $stderr = class Symfony\Component\Console\Output\StreamOutput { private int ${Symfony\Component\Console\Output\Output}verbosity = 32; private Symfony\Component\Console\Formatter\OutputFormatterInterface ${Symfony\Component\Console\Output\Output}formatter = class Symfony\Component\Console\Formatter\OutputFormatter...")
28 artisan:0
{main}()
Whoops\Exception\ErrorException
Declaration of VladimirYuldashev\LaravelQueueRabbitMQ\Consumer::stop($status = 0): int must be compatible with Illuminate\Queue\Worker::stop($status = 0, $options = null)
at vendor/vladimir-yuldashev/laravel-queue-rabbitmq/src/Consumer.php:200
196▕ *
197▕ * @param int $status
198▕ * @return int
199▕ */
➜ 200▕ public function stop($status = 0): int
201▕ {
202▕ // Tell the server you are going to stop consuming.
203▕ // It will finish up the last message and not send you any more.
204▕ $this->channel->basic_cancel($this->consumerTag, false, true);
+1 vendor frames
2 [internal]:0
Whoops\Run::handleShutdown()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255 |
Hi, new maintainers were recently added and we are getting up to speed with going through issues and getting the library compatible again! |
@M-Porter any ETA on merging? No rush, just so I know whether to wait or try out some of the suggested workarounds instead. |
hey @samlay, hopefully by the end of the week. But I'm also moving on Saturday which means my free time it taken up by packing so please don't hold me to that 😅 |
I used command:
composer update at laravel version 9.42
log:
`PHP Fatal error: Declaration of VladimirYuldashev\LaravelQueueRabbitMQ\Consumer::stop($status = 0): int must be compatible with Illuminate\Queue\Worker::stop($status = 0, $options = null) in /home/gabriel/Projekty/subjects_and_grades/vendor/vladimir-yuldashev/laravel-queue-rabbitmq/src/Consumer.php on line 200
Symfony\Component\ErrorHandler\Error\FatalError
Declaration of VladimirYuldashev\LaravelQueueRabbitMQ\Consumer::stop($status = 0): int must be compatible with Illuminate\Queue\Worker::stop($status = 0, $options = null)
at vendor/vladimir-yuldashev/laravel-queue-rabbitmq/src/Consumer.php:200
196▕ *
197▕ * @param int $status
198▕ * @return int
199▕ */
➜ 200▕ public function stop($status = 0): int
201▕ {
202▕ // Tell the server you are going to stop consuming.
203▕ // It will finish up the last message and not send you any more.
204▕ $this->channel->basic_cancel($this->consumerTag, false, true);
Whoops\Exception\ErrorException
Declaration of VladimirYuldashev\LaravelQueueRabbitMQ\Consumer::stop($status = 0): int must be compatible with Illuminate\Queue\Worker::stop($status = 0, $options = null)
at vendor/vladimir-yuldashev/laravel-queue-rabbitmq/src/Consumer.php:200
196▕ *
197▕ * @param int $status
198▕ * @return int
199▕ */
➜ 200▕ public function stop($status = 0): int
201▕ {
202▕ // Tell the server you are going to stop consuming.
203▕ // It will finish up the last message and not send you any more.
204▕ $this->channel->basic_cancel($this->consumerTag, false, true);
2 [internal]:0
Whoops\Run::handleShutdown()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
`
The text was updated successfully, but these errors were encountered: