Spookie/bin/console

18 lines
492 B
Plaintext
Raw Permalink Normal View History

2021-05-30 17:18:58 +02:00
#!/usr/bin/env php
<?php
use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
2021-06-14 19:20:55 +02:00
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
2021-05-30 17:18:58 +02:00
}
2021-06-14 19:20:55 +02:00
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
2021-05-30 17:18:58 +02:00
2021-06-14 19:20:55 +02:00
return function (array $context) {
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
2021-05-30 17:18:58 +02:00
2021-06-14 19:20:55 +02:00
return new Application($kernel);
};