console 915 B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env php
  2. <?php
  3. exit;
  4. use Symfony\Bundle\FrameworkBundle\Console\Application;
  5. use Symfony\Component\Console\Input\ArgvInput;
  6. use Symfony\Component\Debug\Debug;
  7. // if you don't want to setup permissions the proper way, just uncomment the following PHP line
  8. // read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
  9. //umask(0000);
  10. set_time_limit(0);
  11. /**
  12. * @var Composer\Autoload\ClassLoader $loader
  13. */
  14. $loader = require __DIR__.'/autoload.php';
  15. require_once __DIR__.'/AppKernel.php';
  16. $input = new ArgvInput();
  17. $env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
  18. $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
  19. if ($debug) {
  20. Debug::enable();
  21. }
  22. $kernel = new AppKernel($env, $debug);
  23. $application = new Application($kernel);
  24. $application->run($input);