console 889 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env php
  2. <?php
  3. use Composer\Autoload\ClassLoader;
  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 ClassLoader
  13. */
  14. $loader = require __DIR__.'/autoload.php';
  15. $input = new ArgvInput();
  16. $env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
  17. $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--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);