Commit 72eb261d authored by catch's avatar catch
Browse files

fix: #3555152 Move skip_procedural_hook_scan cleanup to HookCollectorKeyValueWritePass

By: nicxvan
(cherry picked from commit ba3a99e2)
parent 99995935
Loading
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -34,6 +34,15 @@ public function process(ContainerBuilder $container): void {
    assert($keyvalue instanceof KeyValueStoreInterface);
    $keyvalue->setMultiple($hookData);
    $container->get('cache.bootstrap')->deleteMultiple(['hook_data', 'theme_hook_data']);

    // Remove converted flags, they are only needed while building the
    // container.
    $parameters = $container->getParameterBag();
    foreach ($parameters->all() as $name => $value) {
      if (str_ends_with($name, '.skip_procedural_hook_scan')) {
        $parameters->remove($name);
      }
    }
  }

}
+0 −9
Original line number Diff line number Diff line
@@ -195,15 +195,6 @@ protected function writeToContainer(ContainerBuilder $container): void {
      'group_includes' => $groupIncludes,
      'packed_order_operations' => $packed_order_operations,
    ]);

    // Remove converted flags, they are only needed while building the
    // container.
    $parameters = $container->getParameterBag();
    foreach ($parameters->all() as $name => $value) {
      if (str_ends_with($name, '.skip_procedural_hook_scan')) {
        $parameters->remove($name);
      }
    }
  }

  /**