You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Symfony version(s) affected: 4.1 and 4.2 (have not tried with other versions).
Description
This happens when I use multiple Twig loaders and run ./bin/console debug:twig. The error message is
In DebugCommand.php line 249:
Attempted to call an undefined method named "getNamespaces" of class "Twig_Loader_Chain".
How to reproduce
Start a new Symfony project composer create-project symfony/website-skeleton test
Add a new Twig loader to services.yaml, under services: section, as extra_twig_loader: { class: Twig\Loader\FilesystemLoader }
Run ./bin/console debug:twig
I might have been missing something when adding a new Twig loader, but for now, it's the error I get. Looking at DebugCommand.php code, the Twig loader instance for multiple Twig loaders is ChainLoader instead of FilesystemLoader. This ChainLoader doesn't have getNamespaces() method.