Skip to content

Commit bca3628

Browse files
committed
Request and response services don't need to be singleton scope anymore
1 parent b3d4dbb commit bca3628

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/config.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@
4343
return new Slim\Http\Environment($_SERVER);
4444
},
4545

46-
'request' => factory(function (ContainerInterface $c) {
46+
'request' => function (ContainerInterface $c) {
4747
return Request::createFromEnvironment($c->get('environment'));
48-
})->scope(Scope::SINGLETON),
49-
'response' => factory(function (ContainerInterface $c) {
48+
},
49+
'response' => function (ContainerInterface $c) {
5050
$headers = new Headers(['Content-Type' => 'text/html; charset=UTF-8']);
5151
$response = new Response(200, $headers);
5252
return $response->withProtocolVersion($c->get('settings')['httpVersion']);
53-
})->scope(Scope::SINGLETON),
53+
},
5454

5555
'foundHandler' => object(ControllerInvoker::class)
5656
->constructor(get('foundHandler.invoker')),

0 commit comments

Comments
 (0)