Issue #2558885 by Cottser, jhedstrom, david_garcia, alexpott: TwigEnvironment...
Issue #2558885 by Cottser, jhedstrom, david_garcia, alexpott: TwigEnvironment is unable to cache inline templates because it sends invalid filenames to MTimeProtectedFastFileStorage
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
// Tests caching of inline templates with long content to ensure the
// generated cache key can be used as a filename.
$element=[];
$element['test']=[
'#type'=>'inline_template',
'#template'=>'Llamas sometimes spit and wrestle with their {{ llama }}. Kittens are soft and fuzzy and they sometimes say {{ kitten }}. Flamingos have long legs and they are usually {{ flamingo }}. Pandas eat bamboo and they are {{ panda }}. Giraffes have long necks and long tongues and they eat {{ giraffe }}.',
'#context'=>[
'llama'=>'necks',
'kitten'=>'meow',
'flamingo'=>'pink',
'panda'=>'bears',
'giraffe'=>'leaves',
],
];
$expected='Llamas sometimes spit and wrestle with their necks. Kittens are soft and fuzzy and they sometimes say meow. Flamingos have long legs and they are usually pink. Pandas eat bamboo and they are bears. Giraffes have long necks and long tongues and they eat leaves.';
$element_copy=$element;
// Render it twice so that twig caching is triggered.