- Laravel Version: 5.6.12
- PHP Version: 7.2.1
- Database Driver & Version: Not relevant
Description:
I want to contextually bind a service to the handle method of a Job. When
Steps To Reproduce:
- Have a Job that takes a service defined as an interface.
- Bind a service contextually to the job.
$this->app->when(Job::class)->needs(Contract::class)->give(function () { return Concrete(); });
Result
The queue worker endlessly tries to process the message, failing and then retrying. It was not easy to determine this was the problem either. When wiring cannot be resovled I don't expect it to be handled the same way "failed job processing" is handled.
