console 825 Bytes
Newer Older
Fabien Potencier's avatar
Fabien Potencier committed
1 2 3 4
#!/usr/bin/env php
<?php
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
5
use Symfony\Component\Debug\Debug;
6
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
7 8
// read https://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup
// for more information
9
//umask(0000);
10
set_time_limit(0);
11
require __DIR__.'/autoload.php';
Fabien Potencier's avatar
Fabien Potencier committed
12
$input = new ArgvInput();
13 14
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev', true);
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption('--no-debug', true) && $env !== 'prod';
15 16 17
if ($debug) {
    Debug::enable();
}
Fabien Potencier's avatar
Fabien Potencier committed
18 19
$kernel = new AppKernel($env, $debug);
$application = new Application($kernel);
20
$application->run($input);