{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/internals/issues/308","repository_url":"https://api.github.com/repos/laravel/internals","labels_url":"https://api.github.com/repos/laravel/internals/issues/308/labels{/name}","comments_url":"https://api.github.com/repos/laravel/internals/issues/308/comments","events_url":"https://api.github.com/repos/laravel/internals/issues/308/events","html_url":"https://github.com/laravel/internals/issues/308","id":190156226,"number":308,"title":"load dev providers separately to normal providers","user":{"login":"alexbowers","id":842974,"avatar_url":"https://avatars.githubusercontent.com/u/842974?v=3","gravatar_id":"","url":"https://api.github.com/users/alexbowers","html_url":"https://github.com/alexbowers","followers_url":"https://api.github.com/users/alexbowers/followers","following_url":"https://api.github.com/users/alexbowers/following{/other_user}","gists_url":"https://api.github.com/users/alexbowers/gists{/gist_id}","starred_url":"https://api.github.com/users/alexbowers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexbowers/subscriptions","organizations_url":"https://api.github.com/users/alexbowers/orgs","repos_url":"https://api.github.com/users/alexbowers/repos","events_url":"https://api.github.com/users/alexbowers/events{/privacy}","received_events_url":"https://api.github.com/users/alexbowers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2016-11-17T20:34:38Z","updated_at":"2016-12-29T17:38:34Z","closed_at":null,"body":""},"comment":{"url":"https://api.github.com/repos/laravel/internals/issues/comments/269665179","html_url":"https://github.com/laravel/internals/issues/308#issuecomment-269665179","issue_url":"https://api.github.com/repos/laravel/internals/issues/308","id":269665179,"user":{"login":"svenluijten","id":11269635,"avatar_url":"https://avatars.githubusercontent.com/u/11269635?v=3","gravatar_id":"","url":"https://api.github.com/users/svenluijten","html_url":"https://github.com/svenluijten","followers_url":"https://api.github.com/users/svenluijten/followers","following_url":"https://api.github.com/users/svenluijten/following{/other_user}","gists_url":"https://api.github.com/users/svenluijten/gists{/gist_id}","starred_url":"https://api.github.com/users/svenluijten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svenluijten/subscriptions","organizations_url":"https://api.github.com/users/svenluijten/orgs","repos_url":"https://api.github.com/users/svenluijten/repos","events_url":"https://api.github.com/users/svenluijten/events{/privacy}","received_events_url":"https://api.github.com/users/svenluijten/received_events","type":"User","site_admin":false},"created_at":"2016-12-29T17:38:34Z","updated_at":"2016-12-29T17:38:34Z","body":"The main problem *I* faced (which prompted me making my package) was that there is a distinction between dev and prod in the `composer.json` file, namely as `require` and `require-dev`. Let's say you only want to load [barryvdh's laravel-debugbar](https://github.com/barryvdh/laravel-debugbar) in your development environment, but not in prod. Your `composer.json` might look like this:\r\n\r\n```json\r\n{\r\n    \"require\": {\r\n        \"laravel/framework\": \"5.3.*\"\r\n    }\r\n    \"require-dev\": {\r\n        \"barryvdh/laravel-debugbar\": \"^2.0\",\r\n    }\r\n}\r\n```\r\n\r\nWhen you now go through the deployment process and run `composer install --production`, you're going to run into an issue because when Laravel checks the registered service providers, it'll find the following in the `config/app.php` file:\r\n\r\n```php\r\nreturn [\r\n    // ...\r\n\r\n    'providers' => [\r\n        Barryvdh\\Debugbar\\ServiceProvider::class,\r\n    ],\r\n];\r\n```\r\n\r\nAnd guess what? That class just outright doesn't exist because it wasn't pulled in by Composer. Which then throws a 500 error on your prod/staging environment(s)."}}
{"actor":{"display_login":"svenluijten"}}