console 843 B

123456789101112131415161718192021222324252627
  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 https://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. require __DIR__.'/../vendor/autoload.php';
  12. $input = new ArgvInput();
  13. $env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev', true);
  14. $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption('--no-debug', true) && $env !== 'prod';
  15. if ($debug) {
  16. Debug::enable();
  17. }
  18. $kernel = new AppKernel($env, $debug);
  19. $application = new Application($kernel);
  20. $application->run($input);