start_sf5_project_reboot/app/bin/console

18 lines
492 B
Plaintext
Raw Normal View History

2021-04-17 20:56:03 +00:00
#!/usr/bin/env php
<?php
use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
2022-10-01 15:50:16 +00:00
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
2021-04-17 20:56:03 +00:00
}
2022-10-01 15:50:16 +00:00
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
2021-04-17 20:56:03 +00:00
2022-10-01 15:50:16 +00:00
return function (array $context) {
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
2021-04-17 20:56:03 +00:00
2022-10-01 15:50:16 +00:00
return new Application($kernel);
};