Skip to content

Laravel 8 / Horizon 5 > "Class 'Laravel\Horizon\JobId' not found" when dispatching a Job #362

Closed
@julien-viard-infomaniak

Description

  • Laravel 8.5
  • RabbitMQ 3.8.8
  • Package version: 11

Describe the bug

Simple job dispatch is not working:
DummyJob::dispatch(['dispatch' => 'dispatch']);

Same with a queue push:
Queue::push(new DummyJob(['push' => 'push']));

Steps To Reproduce

What steps needed, to reproduce this bug.

Current behavior

"Class 'Laravel\Horizon\JobId' not found"
vendor/vladimir-yuldashev/laravel-queue-rabbitmq/src/Queue/RabbitMQQueue.php(536): VladimirYuldashev\LaravelQueueRabbitMQ\Horizon\RabbitMQQueue->getRandomId()

Expected behavior

With horizon 5 JobId class has gone, was here with horizon 4

How to fix

Adding class JobId and put an alias of App\Library\Horizon\JobId is class does not exist.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions