From 443818db141fe984f78d211860616171e32c9645 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Sat, 19 Mar 2016 01:31:56 +0100 Subject: [PATCH 1/2] Factorize bootstrap directory --- artisan | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/artisan b/artisan index df630d0d6d5..d9cad61710d 100755 --- a/artisan +++ b/artisan @@ -1,6 +1,8 @@ #!/usr/bin/env php Date: Sat, 19 Mar 2016 01:32:21 +0100 Subject: [PATCH 2/2] Fallback for "clear-compiled" command when vendors not yet installed --- artisan | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/artisan b/artisan index d9cad61710d..f4a6b9aa2dd 100755 --- a/artisan +++ b/artisan @@ -3,6 +3,17 @@ $bootstrapPath = __DIR__.'/bootstrap'; +/* + Composer may call "clear-compiled" before installing the autoloader for + the first time. In this particular case, we'll try to do the cleanup + here, then exit as artisan won't be able to continue nevertheless. +*/ +if (isset($argv[1]) && $argv[1] == 'clear-compiled' && ! file_exists(__DIR__.'/vendor/autoload.php')) { + @unlink($bootstrapPath.'/cache/compiled.php'); + @unlink($bootstrapPath.'/cache/services.json'); + exit; +} + /* |-------------------------------------------------------------------------- | Register The Auto Loader