From a9500b5b0d09561e6af27d1e30a0edd09524bc88 Mon Sep 17 00:00:00 2001 From: 22Alexandra Date: Mon, 28 Feb 2022 11:53:51 +0200 Subject: [PATCH] EWPP-2009: Add default config hash for post_update helper method. --- composer.json | 6 ++++-- oe_corporate_blocks.post_update.php | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 7145b4d..37903ba 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,7 @@ "require-dev": { "behat/behat": "^3.10", "composer/installers": "^1.11", + "composer/xdebug-handler": "^2.0", "drupal/core-composer-scaffold": "^9.2", "drupal/core-dev": "^9.2", "drupal/config_devel": "^1.2", @@ -25,13 +26,14 @@ "openeuropa/code-review": "^2.0", "openeuropa/task-runner-drupal-project-symlink": "^1.0-beta5", "openeuropa/oe_multilingual": "^1.10", - "phpspec/prophecy-phpunit": "^1 || ^2" + "phpspec/prophecy-phpunit": "^2" }, "_readme": [ "Explicit lower version requirement of ctools due to Drupal core 9.2 compatibility.", "Explicit requirement for egulias/email-validator due to https://www.drupal.org/project/drupal/issues/3061074#comment-14300579. It can be removed when Drupal core 9.2 support is droppped.", "Explicit requirement of token module due to PHP7.4 compatbility.", - "Explicit requirement of behat module due to PHP8 compatibility." + "Explicit requirement of behat module due to PHP8 compatibility.", + "Requiring composer/xdebug-handler until PHPMD 2.12 is released" ], "scripts": { "post-install-cmd": "./vendor/bin/run drupal:site-setup", diff --git a/oe_corporate_blocks.post_update.php b/oe_corporate_blocks.post_update.php index 635297e..8bfa309 100644 --- a/oe_corporate_blocks.post_update.php +++ b/oe_corporate_blocks.post_update.php @@ -29,6 +29,7 @@ function _oe_corporate_blocks_import_corporate_links(string $config_path): void foreach ($configs as $config) { if ($data = $source->read($config)) { + $data['_core']['default_config_hash'] = Crypt::hashBase64(serialize($data)); $config_storage->write($config, $data); } }