Skip to content

Commit b7a15b7

Browse files
chore: update Http service registration
Signed-off-by: Josh <[email protected]>
1 parent 2b748f0 commit b7a15b7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/private/AppFramework/DependencyInjection/DIContainer.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,9 @@ public function __construct(string $appName, array $urlParams = [], ?ServerConta
144144

145145
/** @deprecated 32.0.0 */
146146
$this->registerDeprecatedAlias('Protocol', Http::class);
147-
$this->registerService(Http::class, function (ContainerInterface $c) {
148-
$protocol = $c->get(IRequest::class)->getHttpProtocol();
149-
return new Http($_SERVER, $protocol);
150-
});
147+
$this->registerService(Http::class, fn (ContainerInterface $c) =>
148+
new Http($c->get(IRequest::class)->getHttpProtocol())
149+
);
151150

152151
/** @deprecated 32.0.0 */
153152
$this->registerDeprecatedAlias('Dispatcher', Dispatcher::class);

0 commit comments

Comments
 (0)