Unlock this challenge:
What would happen if I added the following config to config/packages/twig.yaml?
config/packages/twig.yaml
twig: global_variables: foo: 1234
This would throw an exception: global_variables is not a valid config key under twig.
global_variables
twig
This would configure a new service called global_variables and pass it the config below.
This would add a new global variable to all templates called foo set to the value 1234.
foo
1234