mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 09:08:42 +02:00
N°8637 - Alerts from dependabot, vulnerable libraries
* Update twig/twig from 3.16.0 to 3.21.1 * Update tecnickcom/tcpdf from 6.7.5 to 6.10.0 * Correct font folder case failing on linux server * Suppress documentation generator from project in favor of the online version * Update symfony/http-foundation from 6.4.2 to 6.4.14 Update symfony/runtime from 6.4.0 to 6.4.24
This commit is contained in:
@@ -71,19 +71,19 @@ class GenericRuntime implements RuntimeInterface
|
||||
if ($debug) {
|
||||
umask(0000);
|
||||
$_SERVER[$debugKey] = $_ENV[$debugKey] = '1';
|
||||
|
||||
if (false !== $errorHandler = ($options['error_handler'] ?? BasicErrorHandler::class)) {
|
||||
$errorHandler::register($debug);
|
||||
$options['error_handler'] = false;
|
||||
}
|
||||
} else {
|
||||
$_SERVER[$debugKey] = $_ENV[$debugKey] = '0';
|
||||
}
|
||||
|
||||
if (false !== $errorHandler = ($options['error_handler'] ?? BasicErrorHandler::class)) {
|
||||
$errorHandler::register($debug);
|
||||
$options['error_handler'] = false;
|
||||
}
|
||||
|
||||
$this->options = $options;
|
||||
}
|
||||
|
||||
public function getResolver(callable $callable, \ReflectionFunction $reflector = null): ResolverInterface
|
||||
public function getResolver(callable $callable, ?\ReflectionFunction $reflector = null): ResolverInterface
|
||||
{
|
||||
$callable = $callable(...);
|
||||
$parameters = ($reflector ?? new \ReflectionFunction($callable))->getParameters();
|
||||
@@ -125,14 +125,14 @@ class GenericRuntime implements RuntimeInterface
|
||||
}
|
||||
|
||||
if (!\is_callable($application)) {
|
||||
throw new \LogicException(sprintf('"%s" doesn\'t know how to handle apps of type "%s".', get_debug_type($this), get_debug_type($application)));
|
||||
throw new \LogicException(\sprintf('"%s" doesn\'t know how to handle apps of type "%s".', get_debug_type($this), get_debug_type($application)));
|
||||
}
|
||||
|
||||
$application = $application(...);
|
||||
}
|
||||
|
||||
if ($_SERVER[$this->options['debug_var_name']] && ($r = new \ReflectionFunction($application)) && $r->getNumberOfRequiredParameters()) {
|
||||
throw new \ArgumentCountError(sprintf('Zero argument should be required by the runner callable, but at least one is in "%s" on line "%d.', $r->getFileName(), $r->getStartLine()));
|
||||
throw new \ArgumentCountError(\sprintf('Zero argument should be required by the runner callable, but at least one is in "%s" on line "%d.', $r->getFileName(), $r->getStartLine()));
|
||||
}
|
||||
|
||||
return new ClosureRunner($application);
|
||||
@@ -171,7 +171,7 @@ class GenericRuntime implements RuntimeInterface
|
||||
if (!$runtime = $this->getRuntime($type)) {
|
||||
$r = $parameter->getDeclaringFunction();
|
||||
|
||||
throw new \InvalidArgumentException(sprintf('Cannot resolve argument "%s $%s" in "%s" on line "%d": "%s" supports only arguments "array $context", "array $argv" and "array $request", or a runtime named "Symfony\Runtime\%1$sRuntime".', $type, $parameter->name, $r->getFileName(), $r->getStartLine(), get_debug_type($this)));
|
||||
throw new \InvalidArgumentException(\sprintf('Cannot resolve argument "%s $%s" in "%s" on line "%d": "%s" supports only arguments "array $context", "array $argv" and "array $request", or a runtime named "Symfony\Runtime\%1$sRuntime".', $type, $parameter->name, $r->getFileName(), $r->getStartLine(), get_debug_type($this)));
|
||||
}
|
||||
|
||||
return $runtime->getArgument($parameter, $type);
|
||||
|
||||
Reference in New Issue
Block a user