2018-01-03 16:35:10 -05:00
|
|
|
<?php declare(strict_types = 1);
|
2017-11-30 15:06:13 -05:00
|
|
|
|
2018-02-14 16:42:39 -05:00
|
|
|
use App\Kernel;
|
2017-11-30 15:06:13 -05:00
|
|
|
use Symfony\Component\Debug\Debug;
|
|
|
|
use Symfony\Component\Dotenv\Dotenv;
|
|
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
|
|
|
2018-01-03 16:35:10 -05:00
|
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
|
|
|
|
|
|
// Parse env file
|
|
|
|
(new Dotenv())->load(__DIR__ . '/../.env');
|
|
|
|
|
|
|
|
// Set environment
|
|
|
|
$_SERVER['APP_ENV'] = 'dev';
|
|
|
|
$_SERVER['APP_DEBUG'] = true;
|
2017-11-30 15:06:13 -05:00
|
|
|
|
|
|
|
|
|
|
|
if ($_SERVER['APP_DEBUG'] ?? ('prod' !== ($_SERVER['APP_ENV'] ?? 'dev'))) {
|
2018-01-03 16:35:10 -05:00
|
|
|
umask(0000);
|
2017-11-30 15:06:13 -05:00
|
|
|
|
2018-01-03 16:35:10 -05:00
|
|
|
Debug::enable();
|
2017-11-30 15:06:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// Request::setTrustedProxies(['0.0.0.0/0'], Request::HEADER_FORWARDED);
|
|
|
|
|
2018-07-16 13:10:00 -04:00
|
|
|
$kernel = new Kernel('dev', true);
|
2017-11-30 15:06:13 -05:00
|
|
|
$request = Request::createFromGlobals();
|
|
|
|
$response = $kernel->handle($request);
|
|
|
|
$response->send();
|
|
|
|
$kernel->terminate($request, $response);
|