mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 14:38:47 +02:00
N°8834 - Add compatibility with PHP 8.4 (#819)
* N°8834 - Add compatibility with PHP 8.4 * Rollback of scssphp/scssphp version upgrade due to compilation error
This commit is contained in:
@@ -70,6 +70,7 @@ class SymfonyRuntime extends GenericRuntime
|
||||
private readonly ConsoleOutput $output;
|
||||
private readonly Application $console;
|
||||
private readonly Command $command;
|
||||
private readonly Request $request;
|
||||
|
||||
/**
|
||||
* @param array {
|
||||
@@ -131,7 +132,7 @@ class SymfonyRuntime extends GenericRuntime
|
||||
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);
|
||||
}
|
||||
|
||||
if ($application instanceof Response) {
|
||||
@@ -179,7 +180,7 @@ class SymfonyRuntime extends GenericRuntime
|
||||
protected function getArgument(\ReflectionParameter $parameter, ?string $type): mixed
|
||||
{
|
||||
return match ($type) {
|
||||
Request::class => Request::createFromGlobals(),
|
||||
Request::class => $this->request ??= Request::createFromGlobals(),
|
||||
InputInterface::class => $this->getInput(),
|
||||
OutputInterface::class => $this->output ??= new ConsoleOutput(),
|
||||
Application::class => $this->console ??= new Application(),
|
||||
|
||||
Reference in New Issue
Block a user