From 79cfba87816d8212504b2e43379895a0a2b5d0a9 Mon Sep 17 00:00:00 2001 From: Rein Van Oyen Date: Mon, 4 May 2020 21:02:31 +0200 Subject: [PATCH] Added StreamFactory to HttpServiceProvider --- src/Http/HttpServiceProvider.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Http/HttpServiceProvider.php b/src/Http/HttpServiceProvider.php index 49ea2d0..8923c47 100644 --- a/src/Http/HttpServiceProvider.php +++ b/src/Http/HttpServiceProvider.php @@ -11,6 +11,7 @@ use Oak\Http\Routing\Router; use Oak\ServiceProvider; use Psr\Http\Message\ResponseFactoryInterface; +use Psr\Http\Message\StreamFactoryInterface; use Psr\Http\Message\ServerRequestInterface; class HttpServiceProvider extends ServiceProvider @@ -26,7 +27,7 @@ public function register(ContainerInterface $app) $app->singleton(KernelInterface::class, Kernel::class); $app->set(ResponseEmitterInterface::class, ResponseEmitter::class); $app->set(ResponseFactoryInterface::class, Psr17Factory::class); - + $app->set(StreamFactoryInterface::class, Psr17Factory::class); $app->set(ServerRequestInterface::class, function($app) { $psr17Factory = $app->get(ResponseFactoryInterface::class); return (new ServerRequestCreator( @@ -37,4 +38,4 @@ public function register(ContainerInterface $app) ))->fromGlobals(); }); } -} \ No newline at end of file +}