Up until Saturday I had a functioning Drupal 8.6.x instance. The I did

composer update

and Drupal 8.6.10 was installed. Since then I get the following in my error logs:

Declaration of Drupal\Core\Template\TwigTransTokenParser::parse(Twig_Token $token) must be compatible with Twig\TokenParser\TokenParserInterface::parse(Twig\Token $token)

and Drush fails with

Robo\Robo::configureContainer() must be an instance of Robo\Config\Config, instance of Drush\Config\DrushConfig given

I use PHP 7.2 on Ubuntu 18.04.

I did a clean reinstall of Drupal 8.6.10 and the same things occur. I've tried to replace 8.6.10 with 8.6.9 and even 8.6.0 but I still get these errors. If it were Java, I would suspect that the interface and the class had been compiled with different versions of the compiler. But I don't know PHP well enough to know where to start. These errors seem to me to be in core: all my code is under modules/xxx.

Any hints?


  • How did you install Drupal 8 initially?
    – 4uk4
    Mar 11, 2019 at 17:33
  • I used composer. I don’t remember the precise command because it was over a year ago. The installation has been updated regularly, using composer, ever since. Mar 11, 2019 at 17:35
  • Was Twig updated or something to v2? twig.symfony.com/doc/1.x/deprecated.html#token-parsers
    – Kevin
    Mar 11, 2019 at 17:48
  • No. Twig has not been updated to v2: twig/twig is at 1.x-dev Mar 11, 2019 at 20:14
  • 2
    I'm voting to close this question as off-topic because it's a bug report which should be posted and followed on drupal.org. See drupal.org/project/drupal/issues/3039408
    – leymannx
    Mar 12, 2019 at 14:18

1 Answer 1


It is a global issue on this new Twig version 1.38.0.

I can be temporarily fixed by downgrading its version using composer require twig/twig:1.37.1

You can follow this issue to know when the Twig version can be updated again.


Not the answer you're looking for? Browse other questions tagged or ask your own question.