Symfony 3 Twig\Extension\AbstractExtension not found error in production mode

前端 未结 1 1468
离开以前
离开以前 2021-01-27 19:28

I have an app that runs fine in dev mode, but when I run it in production this pops up:

Fatal error: Class \'Twig\\Extension\\AbstractExtension\' not found in C:         


        
1条回答
  •  一生所求
    2021-01-27 19:51

    Symfony\Bridge\Twig\Extension\LogoutUrlExtension extends Twig\Extension\AbstractExtension\AbstractExtension (which seemed to be missing for you).

    That file is part of the twig/extensions package, so composer require twig/extensions should to the trick.

    Why twig/extensions isn't required by the Symfony Twig Bridge I don't know. (The requires section on packagist.org only mentions twig/twig)

    0 讨论(0)
提交回复
热议问题