reactive-slim icon indicating copy to clipboard operation
reactive-slim copied to clipboard

Research into swapping `Zend\Diactoros\ServerRequest` with `Slim\Http\Request`

Open NigelGreenway opened this issue 7 years ago • 0 comments

It seems like this is the better solution as it is all native to SlimPHP, but is this the right right to go, as they both use the PSR interface it should be simple to swap out and remove the non-required dependancy of Zend\Diactoros?

$slimRequest = new Request(
    $request->getMethod(),
    Uri::createFromString(
         $request->getPath() . '?' . http_build_query($request->getQueryParams())
    ),
    new Headers($request->getHeaders()),
    SlimCookies::parseHeader($request->getHeader('Cookie')),
    [],
    $stream,
    []
);

NigelGreenway avatar Jun 14 '17 09:06 NigelGreenway