Description
Laravel Version
11
PHP Version
any supported
Database Driver & Version
No response
Description
Having some job with filled queue with onQueue call.
When I call Bus::chain([$job1, $job2]) they are pushed to specified queue.
When I call Bus::batch([$job1, $job2]) they are pushed to queue default.
Documentation https://laravel.com/docs/11.x/queues#batch-connection-queue is not very clear about this behaviour, only mentions, that queue should be same, and it is same.
Such inconsistent behavior between Chain and Batch is very confusing.
It this behaviour a bug (in this case i will provide PR with fix in code) or it is expected (in this case i will provide PR to documentation, clarifying this behavior) ?
Steps To Reproduce
create ProcessPodcast job with onQueue (second example in) https://laravel.com/docs/11.x/queues#dispatching-to-a-particular-queue
Run Bus::chain([new ProcessPodcast]) and Bus::batch([new ProcessPodcast]) and see, that batch send job to default
queue, while chain to processing
queue.