kriswallsmith / assetic

Asset Management for PHP
MIT License
3.75k stars 555 forks source link

Fatal error AsseticTokenParser following twig/twig update #888

Closed Soviann closed 5 years ago

Soviann commented 5 years ago

Hello, since this commit : https://github.com/twigphp/Twig/commit/baa70287f5b8eff6d90c5779f82088379ebf94a4#diff-93cf20cdc02735a0532878a1b724e860

There's this error : Fatal error: Declaration of Assetic\Extension\Twig\AsseticTokenParser::parse(Twig_Token $token) must be compatible with Twig\TokenParser\TokenParserInterface::parse(Twig\Token $token) in /private/var/www/Siqual/crm-alec27/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticTokenParser.php on line 198

PhilETaylor commented 5 years ago

Yup, I just got this after a composer update :(

Twig 2.7.* is now namespaced.

arjanfrans commented 5 years ago

I have the same problem after upgrading twig from 1.34 to 1.38.

PhilETaylor commented 5 years ago

@arjanfrans for the time being downgrade your twig in your composer.json and run another composer update

"twig/twig": "2.6.*",

emodric commented 5 years ago

Reported to Twig maintainers: https://github.com/twigphp/Twig/issues/2886