[Web] Update composer libraries

This commit is contained in:
FreddleSpl0it committed 2026-10-28 11:56:29 +01:00
1 parent 9cc8ac2908
commit bd8c784118
1297 files changed
+71585 -24460

No files matched your search

@@ -19,19 +19,20 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
class TranslatableMessage implements TranslatableInterface
{
private string $message;
private array $parameters;
private ?string $domain;
public function __construct(string $message, array $parameters = [], ?string $domain = null)
{
$this->message = $message;
$this->parameters = $parameters;
$this->domain = $domain;
public function __construct(
private string $message,
private array $parameters = [],
private ?string $domain = null,
) {
}
/**
* @deprecated since Symfony 7.4
*/
public function __toString(): string
{
trigger_deprecation('symfony/translation', '7.4', 'Method "%s()" is deprecated.', __METHOD__);
return $this->getMessage();
}
@@ -52,9 +53,13 @@ class TranslatableMessage implements TranslatableInterface
public function trans(TranslatorInterface $translator, ?string $locale = null): string
{
return $translator->trans($this->getMessage(), array_map(
static fn ($parameter) => $parameter instanceof TranslatableInterface ? $parameter->trans($translator, $locale) : $parameter,
$this->getParameters()
), $this->getDomain(), $locale);
$parameters = $this->getParameters();
foreach ($parameters as $k => $v) {
if ($v instanceof TranslatableInterface) {
$parameters[$k] = $v->trans($translator, $locale);
}
}
return $translator->trans($this->getMessage(), $parameters, $this->getDomain(), $locale);
}
}