1

Running Lumen 5.2.6

When I fire up a Job, if I do this:

public function handle(Application $app) { dd($app); ...

the dump of the $app is very different than the $app that I would get if I dump at the AppServiceProvider.php level. It doesn't contain the same amount of binding which I need such as connectors and a few other binds that I have invoked via packages

I have put a var_dump($this->app); in the AppServiceProvider.php within the register() function and then a dd($app); as shown above when I invoked a php artisan queue:work command. The dump are different and I need several missing bindings in order to "complete" the job (sending to Iron.io queue, requiring some push to ElasticSearch, etc...)

Is this a lumen bug or am I not understanding something in Laravel?

azngunit81
  • 1,574
  • 2
  • 20
  • 38
  • How about using app() helper or Container::getInstance() instead of dependency resolution? So far it looks like CLI and web $app should be exactly the same - there is only one bootstrap in Lumen. My only suspicion is the resolution – Denis Mysenko May 24 '16 at 23:18
  • @DenisMysenko I have tried the app() helper also, it gives me the exact same one as the DI object and not the one during the boot up. Which is very very weird. – azngunit81 May 24 '16 at 23:40

0 Answers0