console 909 B

12345678910111213141516171819202122232425262728293031
  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/book/installation.html#configuration-and-setup for more information
  8. //umask(0000);
  9. set_time_limit(0);
  10. /**
  11. * @var Composer\Autoload\ClassLoader $loader
  12. */
  13. $loader = require __DIR__.'/autoload.php';
  14. require_once __DIR__.'/AppKernel.php';
  15. $input = new ArgvInput();
  16. $env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
  17. $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
  18. if ($debug) {
  19. Debug::enable();
  20. }
  21. $kernel = new AppKernel($env, $debug);
  22. $application = new Application($kernel);
  23. $application->run($input);