You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
629 B

  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. };