diff --git a/src/Bridge/Psr7/RequestFactory.php b/src/Bridge/Psr7/RequestFactory.php index 003116be0..e0dd35c07 100644 --- a/src/Bridge/Psr7/RequestFactory.php +++ b/src/Bridge/Psr7/RequestFactory.php @@ -9,8 +9,6 @@ /** * Create a PSR-7 request from a lambda event. * - * TODO use Diactoros to have less dependencies. - * * @author Matthieu Napoli */ class RequestFactory @@ -36,19 +34,6 @@ public function fromLambdaEvent(array $event) : ServerRequestInterface 'REQUEST_URI' => $uri, ]; - // Inspired from \Symfony\Component\HttpFoundation\Request::overrideGlobals() -// foreach ($headers as $key => $value) { -// $key = strtoupper(str_replace('-', '_', $key)); -// if (in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH'])) { -// $server[$key] = implode(', ', $value); -// } else { -// $server['HTTP_'.$key] = implode(', ', (array) $value); -// } -// } - -// $request = Request::createFromEnvironment(new Environment($server)); -// $request = $request->withParsedBody($request); - $request = new ServerRequest( $server, $files,