diff --git a/core/core.services.yml b/core/core.services.yml
index 953c7c519f1..c2842a70402 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -1554,7 +1554,7 @@ services:
class: Drupal\Core\Extension\InfoParser
twig:
class: Drupal\Core\Template\TwigEnvironment
- arguments: ['@app.root', '@cache.default', '%twig_extension_hash%', '@twig.loader', '%twig.config%']
+ arguments: ['@app.root', '@cache.default', '%twig_extension_hash%', '@state', '@twig.loader', '%twig.config%']
tags:
- { name: service_collector, tag: 'twig.extension', call: addExtension }
twig.extension:
diff --git a/core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php b/core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php
index e564fd087a4..879f13b3c36 100644
--- a/core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php
+++ b/core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php
@@ -10,6 +10,7 @@ use Doctrine\Common\Annotations\SimpleAnnotationReader;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Doctrine\Common\Reflection\StaticReflectionParser;
use Drupal\Component\Plugin\Discovery\DiscoveryTrait;
+use Drupal\Component\Utility\Crypt;
/**
* Defines a discovery mechanism to find annotated plugins in PSR-0 namespaces.
@@ -74,7 +75,7 @@ class AnnotatedClassDiscovery implements DiscoveryInterface {
$this->annotationNamespaces = $annotation_namespaces;
$file_cache_suffix = str_replace('\\', '_', $plugin_definition_annotation_name);
- $file_cache_suffix .= ':' . hash('crc32b', serialize($annotation_namespaces));
+ $file_cache_suffix .= ':' . Crypt::hashBase64(serialize($annotation_namespaces));
$this->fileCache = FileCacheFactory::get('annotation_discovery:' . $file_cache_suffix);
}
diff --git a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php
index 984ec509bcf..76a43fd2a51 100644
--- a/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php
+++ b/core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php
@@ -2,6 +2,7 @@
namespace Drupal\Component\DependencyInjection\Dumper;
+use Drupal\Component\Utility\Crypt;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Parameter;
@@ -373,7 +374,7 @@ class OptimizedPhpArrayDumper extends Dumper {
protected function getPrivateServiceCall($id, Definition $definition, $shared = FALSE) {
$service_definition = $this->getServiceDefinition($definition);
if (!$id) {
- $hash = hash('sha1', serialize($service_definition));
+ $hash = Crypt::hashBase64(serialize($service_definition));
$id = 'private__' . $hash;
}
return (object) array(
diff --git a/core/lib/Drupal/Core/Access/RouteProcessorCsrf.php b/core/lib/Drupal/Core/Access/RouteProcessorCsrf.php
index ce0a2611ef3..d529c0cf784 100644
--- a/core/lib/Drupal/Core/Access/RouteProcessorCsrf.php
+++ b/core/lib/Drupal/Core/Access/RouteProcessorCsrf.php
@@ -2,6 +2,7 @@
namespace Drupal\Core\Access;
+use Drupal\Component\Utility\Crypt;
use Drupal\Core\Render\BubbleableMetadata;
use Drupal\Core\RouteProcessor\OutboundRouteProcessorInterface;
use Symfony\Component\Routing\Route;
@@ -45,7 +46,7 @@ class RouteProcessorCsrf implements OutboundRouteProcessorInterface {
}
else {
// Generate a placeholder and a render array to replace it.
- $placeholder = hash('sha1', $path);
+ $placeholder = Crypt::hashBase64($path);
$placeholder_render_array = [
'#lazy_builder' => ['route_processor_csrf:renderPlaceholderCsrfToken', [$path]],
];
diff --git a/core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php b/core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php
index 2ea20ff54cf..e639966c2da 100644
--- a/core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php
+++ b/core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php
@@ -2,6 +2,7 @@
namespace Drupal\Core\Config\Development;
+use Drupal\Component\Utility\Crypt;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Core\Config\ConfigCrudEvent;
use Drupal\Core\Config\ConfigEvents;
@@ -79,7 +80,7 @@ class ConfigSchemaChecker implements EventSubscriberInterface {
$name = $saved_config->getName();
$data = $saved_config->get();
- $checksum = hash('crc32b', serialize($data));
+ $checksum = Crypt::hashBase64(serialize($data));
if (!in_array($name, $this->exclude) && !isset($this->checked[$name . ':' . $checksum])) {
$this->checked[$name . ':' . $checksum] = TRUE;
$errors = $this->checkConfigSchema($this->typedManager, $name, $data);
diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/TwigExtensionPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/TwigExtensionPass.php
index d5c793199fd..73ee17b68aa 100644
--- a/core/lib/Drupal/Core/DependencyInjection/Compiler/TwigExtensionPass.php
+++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/TwigExtensionPass.php
@@ -2,6 +2,7 @@
namespace Drupal\Core\DependencyInjection\Compiler;
+use Drupal\Component\Utility\Crypt;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -26,7 +27,7 @@ class TwigExtensionPass implements CompilerPassInterface {
$twig_extension_hash .= $class_name . filemtime($reflection->getFileName());
}
- $container->setParameter('twig_extension_hash', hash('crc32b', $twig_extension_hash));
+ $container->setParameter('twig_extension_hash', Crypt::hashBase64($twig_extension_hash));
}
}
diff --git a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php
index 7097b85df3b..1b3e6c0fbbe 100644
--- a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php
+++ b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php
@@ -2,6 +2,7 @@
namespace Drupal\Core\Entity;
+use Drupal\Component\Utility\Crypt;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
use Drupal\Core\Entity\Entity\EntityViewDisplay;
@@ -462,7 +463,7 @@ class EntityViewBuilder extends EntityHandlerBase implements EntityHandlerInterf
// series of fields individually for cases such as views tables.
$entity_type_id = $entity->getEntityTypeId();
$bundle = $entity->bundle();
- $key = $entity_type_id . ':' . $bundle . ':' . $field_name . ':' . hash('crc32b', serialize($display_options));
+ $key = $entity_type_id . ':' . $bundle . ':' . $field_name . ':' . Crypt::hashBase64(serialize($display_options));
if (!isset($this->singleFieldDisplays[$key])) {
$this->singleFieldDisplays[$key] = EntityViewDisplay::create(array(
'targetEntityType' => $entity_type_id,
diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php
index 878967b9c91..803b4f1c57a 100644
--- a/core/lib/Drupal/Core/Form/FormBuilder.php
+++ b/core/lib/Drupal/Core/Form/FormBuilder.php
@@ -683,8 +683,9 @@ class FormBuilder implements FormBuilderInterface, FormValidatorInterface, FormS
// will be replaced at the very last moment. This ensures forms with
// dynamically generated action URLs don't have poor cacheability.
// Use the proper API to generate the placeholder, when we have one. See
- // https://www.drupal.org/node/2562341.
- $placeholder = 'form_action_' . hash('crc32b', __METHOD__);
+ // https://www.drupal.org/node/2562341. The placholder uses a fixed string
+ // that is Crypt::hashBase64('Drupal\Core\Form\FormBuilder::prepareForm');
+ $placeholder = 'form_action_p_pvdeGsVG5zNF_XLGPTvYSKCf43t8qZYSwcfZl2uzM';
$form['#attached']['placeholders'][$placeholder] = [
'#lazy_builder' => ['form_builder:renderPlaceholderFormAction', []],
@@ -744,7 +745,7 @@ class FormBuilder implements FormBuilderInterface, FormValidatorInterface, FormS
if ($user && $user->isAuthenticated()) {
// Generate a public token based on the form id.
// Generates a placeholder based on the form ID.
- $placeholder = 'form_token_placeholder_' . hash('crc32b', $form_id);
+ $placeholder = 'form_token_placeholder_' . Crypt::hashBase64($form_id);
$form['#token'] = $placeholder;
$form['form_token'] = array(
diff --git a/core/lib/Drupal/Core/Render/PlaceholderGenerator.php b/core/lib/Drupal/Core/Render/PlaceholderGenerator.php
index 488ab8812b4..fad8cf74504 100644
--- a/core/lib/Drupal/Core/Render/PlaceholderGenerator.php
+++ b/core/lib/Drupal/Core/Render/PlaceholderGenerator.php
@@ -2,6 +2,7 @@
namespace Drupal\Core\Render;
+use Drupal\Component\Utility\Crypt;
use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Cache\Cache;
@@ -84,7 +85,7 @@ class PlaceholderGenerator implements PlaceholderGeneratorInterface {
// debugging.
$callback = $placeholder_render_array['#lazy_builder'][0];
$arguments = UrlHelper::buildQuery($placeholder_render_array['#lazy_builder'][1]);
- $token = hash('crc32b', serialize($placeholder_render_array));
+ $token = Crypt::hashBase64(serialize($placeholder_render_array));
$placeholder_markup = '';
// Build the placeholder element to return.
diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php
index fe391d8ed58..f5ee4597675 100644
--- a/core/lib/Drupal/Core/Template/TwigEnvironment.php
+++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php
@@ -4,6 +4,7 @@ namespace Drupal\Core\Template;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Render\Markup;
+use Drupal\Core\State\StateInterface;
/**
* A class that defines a Twig environment for Drupal.
@@ -22,6 +23,8 @@ class TwigEnvironment extends \Twig_Environment {
*/
protected $templateClasses;
+ protected $twigCachePrefix = '';
+
/**
* Constructs a TwigEnvironment object and stores cache and storage
* internally.
@@ -32,12 +35,14 @@ class TwigEnvironment extends \Twig_Environment {
* The cache bin.
* @param string $twig_extension_hash
* The Twig extension hash.
+ * @param \Drupal\Core\State\StateInterface $state
+ * The state service.
* @param \Twig_LoaderInterface $loader
* The Twig loader or loader chain.
* @param array $options
* The options for the Twig environment.
*/
- public function __construct($root, CacheBackendInterface $cache, $twig_extension_hash, \Twig_LoaderInterface $loader = NULL, $options = array()) {
+ public function __construct($root, CacheBackendInterface $cache, $twig_extension_hash, StateInterface $state, \Twig_LoaderInterface $loader = NULL, $options = array()) {
// Ensure that twig.engine is loaded, given that it is needed to render a
// template because functions like TwigExtension::escapeFilter() are called.
require_once $root . '/core/themes/engines/twig/twig.engine';
@@ -58,13 +63,35 @@ class TwigEnvironment extends \Twig_Environment {
$this->addExtension($sandbox);
if ($options['cache'] === TRUE) {
- $options['cache'] = new TwigPhpStorageCache($cache, $twig_extension_hash);
+ $current = $state->get('twig_extension_hash_prefix', ['twig_extension_hash' => '']);
+ if ($current['twig_extension_hash'] !== $twig_extension_hash || empty($current['twig_cache_prefix'])) {
+ $current = [
+ 'twig_extension_hash' => $twig_extension_hash,
+ // Generate a new prefix which invalidates any existing cached files.
+ 'twig_cache_prefix' => uniqid(),
+
+ ];
+ $state->set('twig_extension_hash_prefix', $current);
+ }
+ $this->twigCachePrefix = $current['twig_cache_prefix'];
+
+ $options['cache'] = new TwigPhpStorageCache($cache, $this->twigCachePrefix);
}
$this->loader = $loader;
parent::__construct($this->loader, $options);
}
+ /**
+ * Get the cache prefixed used by \Drupal\Core\Template\TwigPhpStorageCache
+ *
+ * @return string
+ * The file cache prefix, or empty string if the cache is disabled.
+ */
+ public function getTwigCachePrefix() {
+ return $this->twigCachePrefix;
+ }
+
/**
* Gets the template class associated with the given string.
*
diff --git a/core/lib/Drupal/Core/Template/TwigPhpStorageCache.php b/core/lib/Drupal/Core/Template/TwigPhpStorageCache.php
index b9f7cae3c14..f99f8c5a429 100644
--- a/core/lib/Drupal/Core/Template/TwigPhpStorageCache.php
+++ b/core/lib/Drupal/Core/Template/TwigPhpStorageCache.php
@@ -43,12 +43,12 @@ class TwigPhpStorageCache implements \Twig_CacheInterface {
*
* @param \Drupal\Core\Cache\CacheBackendInterface $cache
* The cache bin.
- * @param string $twig_extension_hash
- * The Twig extension hash.
+ * @param string $twig_cache_prefix
+ * A Twig cache file prefix that changes when Twig extensions change.
*/
- public function __construct(CacheBackendInterface $cache, $twig_extension_hash) {
+ public function __construct(CacheBackendInterface $cache, $twig_cache_prefix) {
$this->cache = $cache;
- $this->templateCacheFilenamePrefix = $twig_extension_hash;
+ $this->templateCacheFilenamePrefix = $twig_cache_prefix;
}
/**
diff --git a/core/lib/Drupal/Core/TypedData/TypedDataManager.php b/core/lib/Drupal/Core/TypedData/TypedDataManager.php
index 49041501510..b1c295d00e4 100644
--- a/core/lib/Drupal/Core/TypedData/TypedDataManager.php
+++ b/core/lib/Drupal/Core/TypedData/TypedDataManager.php
@@ -158,9 +158,9 @@ class TypedDataManager extends DefaultPluginManager implements TypedDataManagerI
// Root data type and settings.
$parts[] = $root_definition->getDataType();
if ($settings = $root_definition->getSettings()) {
- // Hash the settings into a string. crc32 is the fastest way to hash
- // something for non-cryptographic purposes.
- $parts[] = hash('crc32b', serialize($settings));
+ // Include the settings serialized as JSON as part of the key. The JSON is
+ // a shorter string than the serialized form, so array access is faster.
+ $parts[] = json_encode($settings);
}
// Property path for the requested data object. When creating a list item,
// use 0 in the key as all items look the same.
diff --git a/core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php b/core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php
index 91ad604b49a..8fe3e97a8b6 100644
--- a/core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php
+++ b/core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php
@@ -2,6 +2,7 @@
namespace Drupal\big_pipe\Render\Placeholder;
+use Drupal\Component\Utility\Crypt;
use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Render\Placeholder\PlaceholderStrategyInterface;
@@ -260,7 +261,7 @@ class BigPipeStrategy implements PlaceholderStrategyInterface {
if (isset($placeholder_render_array['#lazy_builder'])) {
$callback = $placeholder_render_array['#lazy_builder'][0];
$arguments = $placeholder_render_array['#lazy_builder'][1];
- $token = hash('crc32b', serialize($placeholder_render_array));
+ $token = Crypt::hashBase64(serialize($placeholder_render_array));
return UrlHelper::buildQuery(['callback' => $callback, 'args' => $arguments, 'token' => $token]);
}
// When the placeholder's render array is not using a #lazy_builder,
diff --git a/core/modules/big_pipe/src/Tests/BigPipePlaceholderTestCases.php b/core/modules/big_pipe/src/Tests/BigPipePlaceholderTestCases.php
index d2db3cb72ce..0a674e05df9 100644
--- a/core/modules/big_pipe/src/Tests/BigPipePlaceholderTestCases.php
+++ b/core/modules/big_pipe/src/Tests/BigPipePlaceholderTestCases.php
@@ -51,7 +51,7 @@ class BigPipePlaceholderTestCases {
// 1. Real-world example of HTML placeholder.
$status_messages = new BigPipePlaceholderTestCase(
['#type' => 'status_messages'],
- '',
+ '',
[
'#lazy_builder' => [
'Drupal\Core\Render\Element\StatusMessages::renderMessages',
@@ -59,29 +59,29 @@ class BigPipePlaceholderTestCases {
],
]
);
- $status_messages->bigPipePlaceholderId = 'callback=Drupal%5CCore%5CRender%5CElement%5CStatusMessages%3A%3ArenderMessages&args[0]&token=a8c34b5e';
+ $status_messages->bigPipePlaceholderId = 'callback=Drupal%5CCore%5CRender%5CElement%5CStatusMessages%3A%3ArenderMessages&args[0]&token=_HAdUpwWmet0TOTe2PSiJuMntExoshbm1kh2wQzzzAA';
$status_messages->bigPipePlaceholderRenderArray = [
- '#markup' => '
',
+ '#markup' => '',
'#cache' => $cacheability_depends_on_session_and_nojs_cookie,
'#attached' => [
'library' => ['big_pipe/big_pipe'],
'drupalSettings' => [
'bigPipePlaceholderIds' => [
- 'callback=Drupal%5CCore%5CRender%5CElement%5CStatusMessages%3A%3ArenderMessages&args[0]&token=a8c34b5e' => TRUE,
+ 'callback=Drupal%5CCore%5CRender%5CElement%5CStatusMessages%3A%3ArenderMessages&args[0]&token=_HAdUpwWmet0TOTe2PSiJuMntExoshbm1kh2wQzzzAA' => TRUE,
],
],
'big_pipe_placeholders' => [
- 'callback=Drupal%5CCore%5CRender%5CElement%5CStatusMessages%3A%3ArenderMessages&args[0]&token=a8c34b5e' => $status_messages->placeholderRenderArray,
+ 'callback=Drupal%5CCore%5CRender%5CElement%5CStatusMessages%3A%3ArenderMessages&args[0]&token=_HAdUpwWmet0TOTe2PSiJuMntExoshbm1kh2wQzzzAA' => $status_messages->placeholderRenderArray,
],
],
];
- $status_messages->bigPipeNoJsPlaceholder = '';
+ $status_messages->bigPipeNoJsPlaceholder = '';
$status_messages->bigPipeNoJsPlaceholderRenderArray = [
- '#markup' => '',
+ '#markup' => '',
'#cache' => $cacheability_depends_on_session_and_nojs_cookie,
'#attached' => [
'big_pipe_nojs_placeholders' => [
- '' => $status_messages->placeholderRenderArray,
+ '' => $status_messages->placeholderRenderArray,
],
],
];
@@ -109,7 +109,7 @@ class BigPipePlaceholderTestCases {
[
'command' => 'insert',
'method' => 'replaceWith',
- 'selector' => '[data-big-pipe-placeholder-id="callback=Drupal%5CCore%5CRender%5CElement%5CStatusMessages%3A%3ArenderMessages&args[0]&token=a8c34b5e"]',
+ 'selector' => '[data-big-pipe-placeholder-id="callback=Drupal%5CCore%5CRender%5CElement%5CStatusMessages%3A%3ArenderMessages&args[0]&token=_HAdUpwWmet0TOTe2PSiJuMntExoshbm1kh2wQzzzAA"]',
'data' => "\n" . ' ' . "\n" . '
Status message
' . "\n" . ' Hello from BigPipe!' . "\n" . ' ' . "\n ",
'settings' => NULL,
],
@@ -267,29 +267,29 @@ class BigPipePlaceholderTestCases {
'#lazy_builder' => ['\Drupal\big_pipe_test\BigPipeTestController::exception', ['llamas', 'suck']],
'#create_placeholder' => TRUE,
],
- '',
+ '',
[
'#lazy_builder' => ['\Drupal\big_pipe_test\BigPipeTestController::exception', ['llamas', 'suck']],
]
);
- $exception->bigPipePlaceholderId = 'callback=%5CDrupal%5Cbig_pipe_test%5CBigPipeTestController%3A%3Aexception&args[0]=llamas&args[1]=suck&token=68a75f1a';
+ $exception->bigPipePlaceholderId = 'callback=%5CDrupal%5Cbig_pipe_test%5CBigPipeTestController%3A%3Aexception&args[0]=llamas&args[1]=suck&token=uhKFNfT4eF449_W-kDQX8E5z4yHyt0-nSHUlwaGAQeU';
$exception->bigPipePlaceholderRenderArray = [
- '#markup' => '',
+ '#markup' => '',
'#cache' => $cacheability_depends_on_session_and_nojs_cookie,
'#attached' => [
'library' => ['big_pipe/big_pipe'],
'drupalSettings' => [
'bigPipePlaceholderIds' => [
- 'callback=%5CDrupal%5Cbig_pipe_test%5CBigPipeTestController%3A%3Aexception&args[0]=llamas&args[1]=suck&token=68a75f1a' => TRUE,
+ 'callback=%5CDrupal%5Cbig_pipe_test%5CBigPipeTestController%3A%3Aexception&args[0]=llamas&args[1]=suck&token=uhKFNfT4eF449_W-kDQX8E5z4yHyt0-nSHUlwaGAQeU' => TRUE,
],
],
'big_pipe_placeholders' => [
- 'callback=%5CDrupal%5Cbig_pipe_test%5CBigPipeTestController%3A%3Aexception&args[0]=llamas&args[1]=suck&token=68a75f1a' => $exception->placeholderRenderArray,
+ 'callback=%5CDrupal%5Cbig_pipe_test%5CBigPipeTestController%3A%3Aexception&args[0]=llamas&args[1]=suck&token=uhKFNfT4eF449_W-kDQX8E5z4yHyt0-nSHUlwaGAQeU' => $exception->placeholderRenderArray,
],
],
];
$exception->embeddedAjaxResponseCommands = NULL;
- $exception->bigPipeNoJsPlaceholder = '';
+ $exception->bigPipeNoJsPlaceholder = '';
$exception->bigPipeNoJsPlaceholderRenderArray = [
'#markup' => $exception->bigPipeNoJsPlaceholder,
'#cache' => $cacheability_depends_on_session_and_nojs_cookie,
@@ -307,29 +307,29 @@ class BigPipePlaceholderTestCases {
'#lazy_builder' => ['\Drupal\big_pipe_test\BigPipeTestController::responseException', []],
'#create_placeholder' => TRUE,
],
- '',
+ '',
[
'#lazy_builder' => ['\Drupal\big_pipe_test\BigPipeTestController::responseException', []],
]
);
- $embedded_response_exception->bigPipePlaceholderId = 'callback=%5CDrupal%5Cbig_pipe_test%5CBigPipeTestController%3A%3AresponseException&&token=2a9bd022';
+ $embedded_response_exception->bigPipePlaceholderId = 'callback=%5CDrupal%5Cbig_pipe_test%5CBigPipeTestController%3A%3AresponseException&&token=PxOHfS_QL-T01NjBgu7Z7I04tIwMp6La5vM-mVxezbU';
$embedded_response_exception->bigPipePlaceholderRenderArray = [
- '#markup' => '',
+ '#markup' => '',
'#cache' => $cacheability_depends_on_session_and_nojs_cookie,
'#attached' => [
'library' => ['big_pipe/big_pipe'],
'drupalSettings' => [
'bigPipePlaceholderIds' => [
- 'callback=%5CDrupal%5Cbig_pipe_test%5CBigPipeTestController%3A%3AresponseException&&token=2a9bd022' => TRUE,
+ 'callback=%5CDrupal%5Cbig_pipe_test%5CBigPipeTestController%3A%3AresponseException&&token=PxOHfS_QL-T01NjBgu7Z7I04tIwMp6La5vM-mVxezbU' => TRUE,
],
],
'big_pipe_placeholders' => [
- 'callback=%5CDrupal%5Cbig_pipe_test%5CBigPipeTestController%3A%3AresponseException&&token=2a9bd022' => $embedded_response_exception->placeholderRenderArray,
+ 'callback=%5CDrupal%5Cbig_pipe_test%5CBigPipeTestController%3A%3AresponseException&&token=PxOHfS_QL-T01NjBgu7Z7I04tIwMp6La5vM-mVxezbU' => $embedded_response_exception->placeholderRenderArray,
],
],
];
$embedded_response_exception->embeddedAjaxResponseCommands = NULL;
- $embedded_response_exception->bigPipeNoJsPlaceholder = '';
+ $embedded_response_exception->bigPipeNoJsPlaceholder = '';
$embedded_response_exception->bigPipeNoJsPlaceholderRenderArray = [
'#markup' => $embedded_response_exception->bigPipeNoJsPlaceholder,
'#cache' => $cacheability_depends_on_session_and_nojs_cookie,
diff --git a/core/modules/big_pipe/src/Tests/BigPipeTest.php b/core/modules/big_pipe/src/Tests/BigPipeTest.php
index a3f773ee16b..bb032e5d33b 100644
--- a/core/modules/big_pipe/src/Tests/BigPipeTest.php
+++ b/core/modules/big_pipe/src/Tests/BigPipeTest.php
@@ -289,7 +289,7 @@ class BigPipeTest extends WebTestBase {
// @see performMetaRefresh()
$this->drupalGet(Url::fromRoute('big_pipe_test_multi_occurrence'));
- $big_pipe_placeholder_id = 'callback=Drupal%5CCore%5CRender%5CElement%5CStatusMessages%3A%3ArenderMessages&args[0]&token=a8c34b5e';
+ $big_pipe_placeholder_id = 'callback=Drupal%5CCore%5CRender%5CElement%5CStatusMessages%3A%3ArenderMessages&args[0]&token=_HAdUpwWmet0TOTe2PSiJuMntExoshbm1kh2wQzzzAA';
$expected_placeholder_replacement = '