caisse-bliss/bin/console

28 lines
843 B
Plaintext
Raw Normal View History

2018-03-13 15:05:52 +01:00
#!/usr/bin/env php
<?php
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
2018-04-04 16:25:25 +02:00
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
// read https://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup
// for more information
//umask(0000);
2018-03-13 15:05:52 +01:00
set_time_limit(0);
require __DIR__.'/../vendor/autoload.php';
$input = new ArgvInput();
2018-04-04 16:25:25 +02:00
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev', true);
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption('--no-debug', true) && $env !== 'prod';
2018-03-13 15:05:52 +01:00
if ($debug) {
2018-04-04 16:25:25 +02:00
Debug::enable();
2018-03-13 15:05:52 +01:00
}
2018-04-04 16:25:25 +02:00
$kernel = new AppKernel($env, $debug);
2018-03-13 15:05:52 +01:00
$application = new Application($kernel);
$application->run($input);