- Issue created by @timohuisman
- 🇳🇿New Zealand quietone
Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies.
In Twig 3.13 there is a new tag types
introduced. It gives us the ability to declare the types of the template variables. See https://twig.symfony.com/doc/3.x/tags/types.html and https://github.com/twigphp/Twig/issues/4165
Add Twig types
to all core templates based on the types in the template preprocess functions. For example block.html.twig
could contain;
{#
/**
* ...
*
* @see template_preprocess_block()
*/
#}
{% types {
plugin_id: 'string',
label: 'string',
configuration: 'array',
in_preview: 'boolean',
content: 'array'
attributes: '\Drupal\Core\Template\Attribute',
...
} %}
Active
11.0 🔥
theme system
Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies.