Release 2.38.0 (#5563)

This commit is contained in:
Kevin Papst
2025-08-08 23:25:42 +02:00
committed by GitHub
parent f3890691ce
commit 04331420ae
88 changed files with 1319 additions and 697 deletions

View File

@@ -17,7 +17,7 @@ use App\Event\ThemeEvent;
use App\Event\ThemeJavascriptTranslationsEvent;
use App\Utils\Color;
use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use Twig\Environment;
use Twig\Extension\RuntimeExtensionInterface;
@@ -40,12 +40,8 @@ final class ThemeExtension implements RuntimeExtensionInterface
{
/** @var User $user */
$user = $this->security->getUser();
$themeEvent = new ThemeEvent($user, $payload);
if ($this->eventDispatcher->hasListeners($eventName)) {
$this->eventDispatcher->dispatch($themeEvent, $eventName);
}
$this->eventDispatcher->dispatch($themeEvent, $eventName);
return $themeEvent;
}
@@ -53,10 +49,7 @@ final class ThemeExtension implements RuntimeExtensionInterface
public function actions(User $user, string $action, string $view, array $payload = []): ThemeEvent
{
$themeEvent = new PageActionsEvent($user, $payload, $action, $view);
if ($this->eventDispatcher->hasListeners($themeEvent->getEventName())) {
$this->eventDispatcher->dispatch($themeEvent, $themeEvent->getEventName());
}
$this->eventDispatcher->dispatch($themeEvent, $themeEvent->getEventName());
return $themeEvent;
}

View File

@@ -46,7 +46,7 @@ final class RuntimeExtensions extends AbstractExtension
public function getFilters(): array
{
return [
new TwigFilter('md2html', [MarkdownExtension::class, 'markdownToHtml'], ['pre_escape' => 'html', 'is_safe' => ['html']]),
new TwigFilter('md2html', [MarkdownExtension::class, 'markdownToHtml'], ['is_safe' => ['html']]),
new TwigFilter('desc2html', [MarkdownExtension::class, 'timesheetContent'], ['is_safe' => ['html']]),
new TwigFilter('comment2html', [MarkdownExtension::class, 'commentContent'], ['is_safe' => ['html']]),
new TwigFilter('comment1line', [MarkdownExtension::class, 'commentOneLiner'], ['pre_escape' => 'html', 'is_safe' => ['html']]),