Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You must call setEscaperRuntime exception with twig 3.10 #1840

Closed
mmarton opened this issue May 11, 2024 · 2 comments
Closed

You must call setEscaperRuntime exception with twig 3.10 #1840

mmarton opened this issue May 11, 2024 · 2 comments

Comments

@mmarton
Copy link

mmarton commented May 11, 2024

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
@smnandre
Copy link
Collaborator

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

@mmarton
Copy link
Author

mmarton commented May 11, 2024

yes, its working with the 2.x branch

@kbond kbond closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants