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