symfony / ux

Symfony UX initiative: a JavaScript ecosystem for Symfony

Home Page:https://ux.symfony.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

You must call setEscaperRuntime exception with twig 3.10

mmarton opened this issue · comments

Hi!

just tried the new twig release and got this exception on kernel boot:

In EscaperExtension.php line 177:
                                                                                                     
  [LogicException]                                                                                   
  You must call setEscaperRuntime() before calling Twig\Extension\EscaperExtension::addSafeClass().  
                                                                                                     

Exception trace:
  at .../vendor/twig/twig/src/Extension/EscaperExtension.php:177
 Twig\Extension\EscaperExtension->addSafeClass() at .../vendor/symfony/ux-twig-component/src/Twig/TwigEnvironmentConfigurator.php:35
 Symfony\UX\TwigComponent\Twig\TwigEnvironmentConfigurator->configure() at .../var/cache/dev/ContainerMl609lm/App_KernelDevDebugContainer.php:2647
 ContainerMl609lm\App_KernelDevDebugContainer::getTwigService() at .../var/cache/dev/ContainerMl609lm/App_KernelDevDebugContainer.php:663
 ContainerMl609lm\App_KernelDevDebugContainer::get_Container_Private_ProfilerService() at .../var/cache/dev/ContainerMl609lm/getConsoleProfilerListenerService.php:23
 ContainerMl609lm\getConsoleProfilerListenerService::do() at .../var/cache/dev/ContainerMl609lm/App_KernelDevDebugContainer.php:637
 ContainerMl609lm\App_KernelDevDebugContainer->load() at .../var/cache/dev/ContainerMl609lm/App_KernelDevDebugContainer.php:1082
 ContainerMl609lm\App_KernelDevDebugContainer::ContainerMl609lm\{closure}() at .../vendor/symfony/event-dispatcher/EventDispatcher.php:235
 Symfony\Component\EventDispatcher\EventDispatcher->sortListeners() at .../vendor/symfony/event-dispatcher/EventDispatcher.php:70
 Symfony\Component\EventDispatcher\EventDispatcher->getListeners() at .../vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:276
 Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->preProcess() at .../vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:133
 Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() at .../vendor/symfony/console/Application.php:1093
 Symfony\Component\Console\Application->doRunCommand() at .../vendor/symfony/framework-bundle/Console/Application.php:126
 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at .../vendor/symfony/console/Application.php:324
 Symfony\Component\Console\Application->doRun() at .../vendor/symfony/framework-bundle/Console/Application.php:80
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at .../vendor/symfony/console/Application.php:175
 Symfony\Component\Console\Application->run() at .../vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:49
 Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run() at .../vendor/autoload_runtime.php:29
 require_once() at .../bin/console:15

Hi @mmarton ! Could you test with the dev branch ? It should be fixed there

yes, its working with the 2.x branch