formapro / JsFormValidatorBundle

The Javascript validation for Symfony 2, 3 and 4 forms
MIT License
128 stars 56 forks source link

Can't install with composer (Twig_Extension error) #161

Open bastien70 opened 4 years ago

bastien70 commented 4 years ago

Hello,

I'm trying to install the bundle but when executing the cache script, I've :

In JsFormValidatorTwigExtension.php line 13:

Attempted to load class "Twig_Extension" from the global namespace.
!! Did you forget a "use" statement?

image

66Ton99 commented 4 years ago

I think it because of new Twig https://github.com/twigphp/Twig-extensions/issues/243 You need use Twig less than 3.0

bastien70 commented 4 years ago

However, my Twig version is 2.12.5 :

<p>The current version is {{ constant('Twig_Environment::VERSION') }}</p>

image

66Ton99 commented 4 years ago

https://github.com/twigphp/Twig/blob/v2.12.5/lib/Twig/Extension.php - you need turn on compatibility for this