From 7193da2f09ec90cb8d105a08368d1fc2e9e8cbd5 Mon Sep 17 00:00:00 2001 From: Rajeshreeputra Date: Fri, 23 Jun 2023 11:49:57 +0530 Subject: [PATCH] ACMS-1861: review feedback changes. --- modules/acquia_cms_common/src/Commands/AcmsCommands.php | 3 +-- .../src/Services/ConfigImporterService.php | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/acquia_cms_common/src/Commands/AcmsCommands.php b/modules/acquia_cms_common/src/Commands/AcmsCommands.php index f04f33fd44..7b2cdd2f46 100644 --- a/modules/acquia_cms_common/src/Commands/AcmsCommands.php +++ b/modules/acquia_cms_common/src/Commands/AcmsCommands.php @@ -270,7 +270,7 @@ public function importSiteStudioPackages() { public function starterKit($filter = '', $options = [ 'project' => self::REQ, 'format' => 'table', - ]): bool|string|array { + ]) { if ($starter_kit = $this->acmsUtilityService->getStarterKit()) { $data['starter-kit'] = $starter_kit; $result = new PropertyList($data); @@ -286,7 +286,6 @@ function ($key, $cellData, FormatterOptions $options, $rowData) { return $result; } $this->output()->writeln('Starter-kit is not installed yet.'); - return FALSE; } } diff --git a/modules/acquia_cms_common/src/Services/ConfigImporterService.php b/modules/acquia_cms_common/src/Services/ConfigImporterService.php index 608e13df47..c9e4395ee7 100644 --- a/modules/acquia_cms_common/src/Services/ConfigImporterService.php +++ b/modules/acquia_cms_common/src/Services/ConfigImporterService.php @@ -210,7 +210,12 @@ public function doImport(StorageComparer $storage_comparer, DrushLoggerManager $ $message = 'The import failed due to the following reasons:' . "\n"; $message .= implode("\n", $config_importer->getErrors()); - Error::logException('config_import', $e); + if (version_compare(\Drupal::VERSION, '10.1', '>=')) { + Error::logException('config_import', $e); + } + else { + watchdog_exception('config_import', $e); + } throw new \Exception($message); } }