{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/laravel/issues/3553","labels_url":"https://api.github.com/repos/laravel/laravel/issues/3553/labels{/name}","comments_url":"https://api.github.com/repos/laravel/laravel/issues/3553/comments","events_url":"https://api.github.com/repos/laravel/laravel/issues/3553/events","html_url":"https://github.com/laravel/laravel/pull/3553","id":115590631,"number":3553,"title":"clear-compiled fix by short circuiting the app and running before creation","user":{"login":"leemason","id":1238646,"avatar_url":"https://avatars.githubusercontent.com/u/1238646?v=3","gravatar_id":"","url":"https://api.github.com/users/leemason","html_url":"https://github.com/leemason","followers_url":"https://api.github.com/users/leemason/followers","following_url":"https://api.github.com/users/leemason/following{/other_user}","gists_url":"https://api.github.com/users/leemason/gists{/gist_id}","starred_url":"https://api.github.com/users/leemason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leemason/subscriptions","organizations_url":"https://api.github.com/users/leemason/orgs","repos_url":"https://api.github.com/users/leemason/repos","events_url":"https://api.github.com/users/leemason/events{/privacy}","received_events_url":"https://api.github.com/users/leemason/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-11-06T21:08:59Z","updated_at":"2015-11-08T00:11:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/laravel/laravel/pulls/3553","html_url":"https://github.com/laravel/laravel/pull/3553","diff_url":"https://github.com/laravel/laravel/pull/3553.diff","patch_url":"https://github.com/laravel/laravel/pull/3553.patch"},"body":"A fix to address the issue discussed here: https://github.com/laravel/framework/issues/9678\r\n\r\nThe root of the problem is the app relying on the application to run such a small task, and the app relying the composer packages being installed to register the service providers.\r\n\r\nIf the codebase isn't in sync with the installed packages the app fails, and then cant clear-compiled file, and then composer cant update to install the correct packages because the clear-compiled failed.\r\n\r\nSo a nice little circular problem here fixed with a few lines in the bootstrap/autoload.php.\r\n\r\nIts put in this place as this is the only place before the app gets created we can intercept.\r\n\r\nThe code simply checks for cli use and the artisan clear-compiled in the argv. Then it does esencially what the clear-compiled command does without the application and then exits."},"comment":{"url":"https://api.github.com/repos/laravel/laravel/issues/comments/154766730","html_url":"https://github.com/laravel/laravel/pull/3553#issuecomment-154766730","issue_url":"https://api.github.com/repos/laravel/laravel/issues/3553","id":154766730,"user":{"login":"leemason","id":1238646,"avatar_url":"https://avatars.githubusercontent.com/u/1238646?v=3","gravatar_id":"","url":"https://api.github.com/users/leemason","html_url":"https://github.com/leemason","followers_url":"https://api.github.com/users/leemason/followers","following_url":"https://api.github.com/users/leemason/following{/other_user}","gists_url":"https://api.github.com/users/leemason/gists{/gist_id}","starred_url":"https://api.github.com/users/leemason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leemason/subscriptions","organizations_url":"https://api.github.com/users/leemason/orgs","repos_url":"https://api.github.com/users/leemason/repos","events_url":"https://api.github.com/users/leemason/events{/privacy}","received_events_url":"https://api.github.com/users/leemason/received_events","type":"User","site_admin":false},"created_at":"2015-11-08T00:11:57Z","updated_at":"2015-11-08T00:11:57Z","body":"PS. ```\\Artisan::call(....)``` and ```php artisan ....``` dont actually perform the same lifecycle either.\r\n\r\nthe ```::call()``` method is never called during an artisan request, its a shortcut method which runs directly on the command class.\r\n\r\nThe ```::call()``` method runs the command directly, without putting it through the artisan application at all, but thats a seperate issue already noted on the framework repo."}}