Skip to content

Commit 73b3403

Browse files
Merge branch '7.4' into 8.0
* 7.4: [TypeInfo] Simple array should be array type Handle signals on text input [TwigBridge] Fix form constraint [Runtime] Reuse the already created Request object when the app needs it as argument returns a kernel [Config] Fix array shape generation for backed enums [Config] Define `TreeBuilder` default generic type Update validators.el.xlf Fix MoneyType: add missing step attribute when html5=true [JsonStreamer] fix invalid json output for list of self [Console] Preserve `--help` option when a command is not found [FrameworkBundle] Fix using `FailedMessages*Command` with `SigningSerializer` [Lock] Fix unserializing already serialized Key payloads [HttpClient] CachingHttpClient must run after UriTemplate and Scoping Only register PhpConfigReferenceDumpPass in dev env with debug flag enabled [Messenger] Fix PHP 8.5 deprecation for pgsqlGetNotify() in PostgreSQL transport chore: PHP CS Fixer - do not use deprecated sets in config verify spanish translations with state needs-review-translation [Security] Fix OIDC discovery when using multiple HttpClient instances [DependencyInjection] Allow manual bindings on parameters with #[Target]
2 parents 5f3b411 + 876f902 commit 73b3403

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

SymfonyRuntime.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class SymfonyRuntime extends GenericRuntime
7373
private readonly ConsoleOutput $output;
7474
private readonly Application $console;
7575
private readonly Command $command;
76+
private readonly Request $request;
7677

7778
/**
7879
* @param array{
@@ -172,7 +173,7 @@ public function getRunner(?object $application): RunnerInterface
172173
return new FrankenPhpWorkerRunner($application, $this->options['worker_loop_max']);
173174
}
174175

175-
return new HttpKernelRunner($application, Request::createFromGlobals(), $this->options['debug'] ?? false);
176+
return new HttpKernelRunner($application, $this->request ??= Request::createFromGlobals(), $this->options['debug'] ?? false);
176177
}
177178

178179
if ($application instanceof Response) {
@@ -217,7 +218,7 @@ public function getRunner(?object $application): RunnerInterface
217218
protected function getArgument(\ReflectionParameter $parameter, ?string $type): mixed
218219
{
219220
return match ($type) {
220-
Request::class => Request::createFromGlobals(),
221+
Request::class => $this->request ??= Request::createFromGlobals(),
221222
InputInterface::class => $this->getInput(),
222223
OutputInterface::class => $this->output ??= new ConsoleOutput(),
223224
Application::class => $this->console ??= new Application(),

0 commit comments

Comments
 (0)