console 629 B

123456789101112131415161718192021
  1. #!/usr/bin/env php
  2. <?php
  3. use App\Kernel;
  4. use Symfony\Bundle\FrameworkBundle\Console\Application;
  5. if (!is_dir(dirname(__DIR__).'/vendor')) {
  6. throw new LogicException('Dependencies are missing. Try running "composer install".');
  7. }
  8. if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
  9. throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
  10. }
  11. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  12. return function (array $context) {
  13. $kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  14. return new Application($kernel);
  15. };