{"action":"closed","issue":{"url":"https://api.github.com/repos/LaravelCollective/bus/issues/7","labels_url":"https://api.github.com/repos/LaravelCollective/bus/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/LaravelCollective/bus/issues/7/comments","events_url":"https://api.github.com/repos/LaravelCollective/bus/issues/7/events","html_url":"https://github.com/LaravelCollective/bus/issues/7","id":126645454,"number":7,"title":"How to install on Lumen 5.2","user":{"login":"josecelano","id":58816,"avatar_url":"https://avatars.githubusercontent.com/u/58816?v=3","gravatar_id":"","url":"https://api.github.com/users/josecelano","html_url":"https://github.com/josecelano","followers_url":"https://api.github.com/users/josecelano/followers","following_url":"https://api.github.com/users/josecelano/following{/other_user}","gists_url":"https://api.github.com/users/josecelano/gists{/gist_id}","starred_url":"https://api.github.com/users/josecelano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josecelano/subscriptions","organizations_url":"https://api.github.com/users/josecelano/orgs","repos_url":"https://api.github.com/users/josecelano/repos","events_url":"https://api.github.com/users/josecelano/events{/privacy}","received_events_url":"https://api.github.com/users/josecelano/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-14T12:29:33Z","updated_at":"2016-01-14T13:16:25Z","closed_at":"2016-01-14T13:16:25Z","body":"I am using this library in a Laravel package and I would like to use that package on a Lumen application.\r\n\r\nI have added this to my `app.php` file: \r\n\r\n```\r\n$app->register(Collective\\Bus\\BusServiceProvider::class);\r\n$app->register(MyServiceProvider::class);\r\n```\r\nAnd this is my service provider:\r\n\r\n```\r\nuse Collective\\Bus\\Dispatcher;\r\nuse Illuminate\\Routing\\Router;\r\nuse Illuminate\\Support\\ServiceProvider;\r\n\r\nclass MyServiceProvider extends ServiceProvider\r\n{\r\n    public function boot(Dispatcher $dispatcher)\r\n    {\r\n        $this->loadViewsFrom(realpath(__DIR__ . '/resources/views'), 'mymodule');\r\n\r\n        $this->setupRoutes($this->app->router);\r\n\r\n        $this->publishes([\r\n            __DIR__ . '/config/mymodule.php' => config_path('mymodule.php'),\r\n        ]);\r\n\r\n        $dispatcher->mapUsing(function ($command) {\r\n            $handler = str_replace('\\\\Command\\\\', '\\\\Handlers\\\\', get_class($command));\r\n            $handler .= 'Handler@handle';\r\n            return $handler;\r\n        });\r\n    }\r\n\t\r\n\t...\r\n}\r\n```\r\n\r\nAnd I get this error:\r\n\r\n```\r\nArgument 1 passed to MyServiceProvider::boot() must be an instance of Collective\\Bus\\Dispatcher, none given, called in /home/vagrant/josecelano/Code/BaseLumenApp/vendor/laravel/lumen-framework/src/Application.php on line 170 and defined\r\n```"}}