mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 03:28:45 +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:
@@ -16,5 +16,5 @@ namespace Symfony\Contracts\Translation;
|
||||
*/
|
||||
interface TranslatableInterface
|
||||
{
|
||||
public function trans(TranslatorInterface $translator, string $locale = null): string;
|
||||
public function trans(TranslatorInterface $translator, ?string $locale = null): string;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ interface TranslatorInterface
|
||||
*
|
||||
* @throws \InvalidArgumentException If the locale contains invalid characters
|
||||
*/
|
||||
public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null): string;
|
||||
public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string;
|
||||
|
||||
/**
|
||||
* Returns the default locale.
|
||||
|
||||
@@ -35,7 +35,7 @@ trait TranslatorTrait
|
||||
return $this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en');
|
||||
}
|
||||
|
||||
public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null): string
|
||||
public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
|
||||
{
|
||||
if (null === $id || '' === $id) {
|
||||
return '';
|
||||
@@ -111,7 +111,7 @@ EOF;
|
||||
return strtr($standardRules[0], $parameters);
|
||||
}
|
||||
|
||||
$message = sprintf('Unable to choose a translation for "%s" with locale "%s" for value "%d". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").', $id, $locale, $number);
|
||||
$message = \sprintf('Unable to choose a translation for "%s" with locale "%s" for value "%d". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").', $id, $locale, $number);
|
||||
|
||||
if (class_exists(InvalidArgumentException::class)) {
|
||||
throw new InvalidArgumentException($message);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "3.4-dev"
|
||||
"dev-main": "3.6-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
|
||||
Reference in New Issue
Block a user