mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 14:38:47 +02:00
N°8017 - Security - dependabot - Symfony's VarDumper vulnerable to un… (#731)
Upgrade all Symfony components to last security fix (~6.4.0)
This commit is contained in:
@@ -37,7 +37,7 @@ final class TranslationExtension extends AbstractExtension
|
||||
private ?TranslatorInterface $translator;
|
||||
private ?TranslationNodeVisitor $translationNodeVisitor;
|
||||
|
||||
public function __construct(TranslatorInterface $translator = null, TranslationNodeVisitor $translationNodeVisitor = null)
|
||||
public function __construct(?TranslatorInterface $translator = null, ?TranslationNodeVisitor $translationNodeVisitor = null)
|
||||
{
|
||||
$this->translator = $translator;
|
||||
$this->translationNodeVisitor = $translationNodeVisitor;
|
||||
@@ -96,7 +96,7 @@ final class TranslationExtension extends AbstractExtension
|
||||
/**
|
||||
* @param array|string $arguments Can be the locale as a string when $message is a TranslatableInterface
|
||||
*/
|
||||
public function trans(string|\Stringable|TranslatableInterface|null $message, array|string $arguments = [], string $domain = null, string $locale = null, int $count = null): string
|
||||
public function trans(string|\Stringable|TranslatableInterface|null $message, array|string $arguments = [], ?string $domain = null, ?string $locale = null, ?int $count = null): string
|
||||
{
|
||||
if ($message instanceof TranslatableInterface) {
|
||||
if ([] !== $arguments && !\is_string($arguments)) {
|
||||
@@ -125,7 +125,7 @@ final class TranslationExtension extends AbstractExtension
|
||||
return $this->getTranslator()->trans($message, $arguments, $domain, $locale);
|
||||
}
|
||||
|
||||
public function createTranslatable(string $message, array $parameters = [], string $domain = null): TranslatableMessage
|
||||
public function createTranslatable(string $message, array $parameters = [], ?string $domain = null): TranslatableMessage
|
||||
{
|
||||
if (!class_exists(TranslatableMessage::class)) {
|
||||
throw new \LogicException(sprintf('You cannot use the "%s" as the Translation Component is not installed. Try running "composer require symfony/translation".', __CLASS__));
|
||||
|
||||
Reference in New Issue
Block a user