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:
Lenaick
2026-02-26 10:36:32 +01:00
committed by GitHub
parent d4821b7edc
commit fc967c06ce
961 changed files with 12298 additions and 7130 deletions

View File

@@ -31,7 +31,7 @@ final class BodyRenderer implements BodyRendererInterface
private HtmlToTextConverterInterface $converter;
private ?LocaleSwitcher $localeSwitcher = null;
public function __construct(Environment $twig, array $context = [], HtmlToTextConverterInterface $converter = null, LocaleSwitcher $localeSwitcher = null)
public function __construct(Environment $twig, array $context = [], ?HtmlToTextConverterInterface $converter = null, ?LocaleSwitcher $localeSwitcher = null)
{
$this->twig = $twig;
$this->context = $context;
@@ -45,7 +45,7 @@ final class BodyRenderer implements BodyRendererInterface
return;
}
if (null === $message->getTextTemplate() && null === $message->getHtmlTemplate()) {
if ($message->isRendered()) {
// email has already been rendered
return;
}
@@ -54,7 +54,7 @@ final class BodyRenderer implements BodyRendererInterface
$messageContext = $message->getContext();
if (isset($messageContext['email'])) {
throw new InvalidArgumentException(sprintf('A "%s" context cannot have an "email" entry as this is a reserved variable.', get_debug_type($message)));
throw new InvalidArgumentException(\sprintf('A "%s" context cannot have an "email" entry as this is a reserved variable.', get_debug_type($message)));
}
$vars = array_merge($this->context, $messageContext, [