Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Symfony/Component/Runtime/SymfonyRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
private readonly ConsoleOutput $output;
private readonly Application $console;
private readonly Command $command;
private readonly Request $request;

/**
* @param array {
Expand Down Expand Up @@ -131,7 +132,7 @@
public function getRunner(?object $application): RunnerInterface
{
if ($application instanceof HttpKernelInterface) {
return new HttpKernelRunner($application, Request::createFromGlobals(), $this->options['debug'] ?? false);
return new HttpKernelRunner($application, $this->request ??= Request::createFromGlobals(), $this->options['debug'] ?? false);

Check failure on line 135 in src/Symfony/Component/Runtime/SymfonyRuntime.php

View workflow job for this annotation

GitHub Actions / Psalm

InaccessibleProperty

src/Symfony/Component/Runtime/SymfonyRuntime.php:135:55: InaccessibleProperty: Symfony\Component\Runtime\SymfonyRuntime::$request is marked readonly (see https://psalm.dev/054)

Check failure on line 135 in src/Symfony/Component/Runtime/SymfonyRuntime.php

View workflow job for this annotation

GitHub Actions / Psalm

InaccessibleProperty

src/Symfony/Component/Runtime/SymfonyRuntime.php:135:55: InaccessibleProperty: Symfony\Component\Runtime\SymfonyRuntime::$request is marked readonly (see https://psalm.dev/054)
}

if ($application instanceof Response) {
Expand Down Expand Up @@ -179,7 +180,7 @@
protected function getArgument(\ReflectionParameter $parameter, ?string $type): mixed
{
return match ($type) {
Request::class => Request::createFromGlobals(),
Request::class => $this->request ??= Request::createFromGlobals(),

Check failure on line 183 in src/Symfony/Component/Runtime/SymfonyRuntime.php

View workflow job for this annotation

GitHub Actions / Psalm

InaccessibleProperty

src/Symfony/Component/Runtime/SymfonyRuntime.php:183:31: InaccessibleProperty: Symfony\Component\Runtime\SymfonyRuntime::$request is marked readonly (see https://psalm.dev/054)

Check failure on line 183 in src/Symfony/Component/Runtime/SymfonyRuntime.php

View workflow job for this annotation

GitHub Actions / Psalm

InaccessibleProperty

src/Symfony/Component/Runtime/SymfonyRuntime.php:183:31: InaccessibleProperty: Symfony\Component\Runtime\SymfonyRuntime::$request is marked readonly (see https://psalm.dev/054)
InputInterface::class => $this->getInput(),
OutputInterface::class => $this->output ??= new ConsoleOutput(),
Application::class => $this->console ??= new Application(),
Expand Down
Loading