Skip to content
Snippets Groups Projects

Issue #3278314 by acbramley: InlineBlockUsageInterface::getUsage can return...

Closed James Glasgow requested to merge issue/drupal-3032078:3032078-multiple-webheads-can into 9.5.x
2 files
+ 62
3
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -9,7 +9,7 @@
/**
* Adds the twig_extension_hash parameter to the container.
*
* Parameter twig_extension_hash is a hash of all extension mtimes for Twig
* Parameter twig_extension_hash is a crc32 hash of all extensions for Twig
* template invalidation.
*/
class TwigExtensionPass implements CompilerPassInterface {
@@ -23,8 +23,8 @@ public function process(ContainerBuilder $container) {
$class_name = $container->getDefinition($service_id)->getClass();
$reflection = new \ReflectionClass($class_name);
// We use the class names as hash in order to invalidate on new extensions
// and mtime for every time we change an existing file.
$twig_extension_hash .= $class_name . filemtime($reflection->getFileName());
// and crc32 for every time we change an existing file.
$twig_extension_hash .= $class_name . hash_file('crc32', $reflection->getFileName());
}
$container->setParameter('twig_extension_hash', Crypt::hashBase64($twig_extension_hash));
Loading