This question already has an answer here:
I get an error after updating twig
- Updating twig/twig (v2.6.0 => v2.6.1):
In composer, I have:
"symfony/twig-bundle": "^4.1",
Error is:
twig/twig "Notice: Undefined index: vars"
In template:
{{ form.vars.id }}
If I put {{ dump(form) }}
, I see +vars ...
It's a (known) bug in twig v2.6.1 - https://github.com/twigphp/Twig/issues/2810
You can simply not update to that version for now, or explicitly mark it not to install until the next version has been released (it should be in the next day or two at most).
twig/twig v2.6.2 was released later the same day correcting the bug.