diff --git a/artisan b/artisan index 36bb2d983..961e94d0b 100644 --- a/artisan +++ b/artisan @@ -15,35 +15,7 @@ require __DIR__.'/bootstrap/autoload.php'; -/* -|-------------------------------------------------------------------------- -| Turn On The Lights -|-------------------------------------------------------------------------- -| -| We need to illuminate PHP development, so let's turn on the lights. -| This bootstrap the framework and gets it ready for use, then it -| will load up this application so that we can run it and send -| the responses back to the browser and delight these users. -| -*/ - -$app = require_once __DIR__.'/bootstrap/start.php'; - -/* -|-------------------------------------------------------------------------- -| Load The Artisan Console Application -|-------------------------------------------------------------------------- -| -| We'll need to run the script to load and return the Artisan console -| application. We keep this in its own script so that we will load -| the console application independent of running commands which -| will allow us to fire commands from Routes when we want to. -| -*/ - -$app->setRequestForConsoleEnvironment(); - -$artisan = Illuminate\Console\Application::start($app); +$app = require_once __DIR__.'/bootstrap/app.php'; /* |-------------------------------------------------------------------------- @@ -56,7 +28,12 @@ $artisan = Illuminate\Console\Application::start($app); | */ -$status = $artisan->run(); +$kernel = $app->make('Illuminate\Contracts\Console\Kernel'); + +$status = $kernel->handle( + $input = new Symfony\Component\Console\Input\ArgvInput, + new Symfony\Component\Console\Output\ConsoleOutput +); /* |-------------------------------------------------------------------------- @@ -69,6 +46,6 @@ $status = $artisan->run(); | */ -$app->shutdown(); +$kernel->terminate($input, $status); exit($status); \ No newline at end of file