console 893 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env php
  2. <?php
  3. use Symfony\Bundle\FrameworkBundle\Console\Application;
  4. 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. // read http://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup
  8. // for more information
  9. //umask(0000);
  10. set_time_limit(0);
  11. /** @var Composer\Autoload\ClassLoader $loader */
  12. $loader = require __DIR__.'/../app/autoload.php';
  13. $input = new ArgvInput();
  14. $env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
  15. $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
  16. if ($debug) {
  17. Debug::enable();
  18. }
  19. $kernel = new AppKernel($env, $debug);
  20. $application = new Application($kernel);
  21. $application->run($input);