Commit 04f2860f authored by gngn's avatar gngn Committed by borisson_

Issue #3019306 by gngn, mfernea, borisson_: Cannot execute facets_update_8006...

Issue #3019306 by gngn, mfernea, borisson_: Cannot execute facets_update_8006 due to missing dependencies block_content_update_8600 (also fails with core 8.5)
parent fa394894
...@@ -13,11 +13,18 @@ use Drupal\block\Entity\Block; ...@@ -13,11 +13,18 @@ use Drupal\block\Entity\Block;
* Implements hook_update_dependencies(). * Implements hook_update_dependencies().
*/ */
function facets_update_dependencies() { function facets_update_dependencies() {
// block_content_update_8600() adds some fields to Blocks that makes $dependencies = [];
// facets_update_8006() fail if upgraded at the same time.
$dependencies['facets'][8006] = [ if (version_compare(\Drupal::VERSION, '8.6', '>=')
'block_content' => 8600, && \Drupal::service('module_handler')->moduleExists('block_content')
]; ) {
// block_content_update_8600() adds some fields to Blocks that makes
// facets_update_8006() fail if upgraded at the same time.
$dependencies['facets'][8006] = [
'block_content' => 8600,
];
}
return $dependencies; return $dependencies;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment