Closed javiereguiluz closed 2 weeks ago
Javier thanks for opening this PR so quickly :)
I was wondering if we could simplify the example even more by referencing the runtime autoload file instead and replace this code:
$kernel = new Kernel('dev', true);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
with this other:
return static function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
}
wdyt?
I like your proposal Yonel. I updated the PR with your changes. Thanks for the review.
Fixes #19975.