From 9a90e6978504aabb3e897e65d485c7d02f792462 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 14 Jun 2020 01:22:50 +0200 Subject: [PATCH] Leverage the new Runtime component --- symfony/console/5.3/bin/console | 17 +++++++++++++++ symfony/console/5.3/manifest.json | 6 ++++++ symfony/framework-bundle/5.3/public/index.php | 21 ++++--------------- 3 files changed, 27 insertions(+), 17 deletions(-) create mode 100755 symfony/console/5.3/bin/console create mode 100644 symfony/console/5.3/manifest.json diff --git a/symfony/console/5.3/bin/console b/symfony/console/5.3/bin/console new file mode 100755 index 000000000..c933dc535 --- /dev/null +++ b/symfony/console/5.3/bin/console @@ -0,0 +1,17 @@ +#!/usr/bin/env php +bootEnv(dirname(__DIR__).'/.env'); - -if ($_SERVER['APP_DEBUG']) { - umask(0000); - - Debug::enable(); -} - -$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); -$request = Request::createFromGlobals(); -$response = $kernel->handle($request); -$response->send(); -$kernel->terminate($request, $response); +return function (array $context) { + return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); +};