diff --git a/application/Espo/Core/Upgrades/Actions/Base.php b/application/Espo/Core/Upgrades/Actions/Base.php index afd75ff314..a2f6662191 100644 --- a/application/Espo/Core/Upgrades/Actions/Base.php +++ b/application/Espo/Core/Upgrades/Actions/Base.php @@ -392,7 +392,7 @@ abstract class Base } /** - * @param string[] $versionList + * @param string[]|string $versionList * @param string $currentVersion * @param string $errorMessage * @return bool diff --git a/application/Espo/Core/Upgrades/Actions/Extension/Install.php b/application/Espo/Core/Upgrades/Actions/Extension/Install.php index bbe47f8e5d..f1797ca3b1 100644 --- a/application/Espo/Core/Upgrades/Actions/Extension/Install.php +++ b/application/Espo/Core/Upgrades/Actions/Extension/Install.php @@ -249,7 +249,7 @@ class Install extends \Espo\Core\Upgrades\Actions\Base\Install } /** - * @param array $dependencyList + * @param array $dependencyList * @return bool */ protected function checkDependencies($dependencyList) diff --git a/application/Espo/Core/Upgrades/Actions/Extension/Upload.php b/application/Espo/Core/Upgrades/Actions/Extension/Upload.php index afd7a641af..824c5f5a46 100644 --- a/application/Espo/Core/Upgrades/Actions/Extension/Upload.php +++ b/application/Espo/Core/Upgrades/Actions/Extension/Upload.php @@ -35,7 +35,7 @@ class Upload extends \Espo\Core\Upgrades\Actions\Base\Upload /** * Check dependencies. * - * @param array|string $dependencyList + * @param array $dependencyList * @return bool */ protected function checkDependencies($dependencyList) diff --git a/application/Espo/Core/Upgrades/Actions/Helper.php b/application/Espo/Core/Upgrades/Actions/Helper.php index 61079f8c7c..4135693a6a 100644 --- a/application/Espo/Core/Upgrades/Actions/Helper.php +++ b/application/Espo/Core/Upgrades/Actions/Helper.php @@ -67,15 +67,17 @@ class Helper /** * Check dependencies. * - * @param array|string $dependencyList + * @param array $dependencyList * @return bool */ public function checkDependencies($dependencyList) { - if (!is_array($dependencyList)) { + if (!is_array($dependencyList)) { /** @phpstan-ignore-line */ $dependencyList = (array) $dependencyList; } + /** @var array $dependencyList */ + $actionObject = $this->getActionObject(); foreach ($dependencyList as $extensionName => $extensionVersion) { @@ -88,8 +90,12 @@ class Helper ]) ->findOne(); - $errorMessage = 'Dependency Error: The extension "'.$extensionName.'" with version "'. - $extensionVersion.'" is missing.'; + $versionString = is_array($extensionVersion) ? + implode(', ', $extensionVersion) : + $extensionVersion; + + $errorMessage = 'Dependency Error: The extension "' . $extensionName .'" with version "'. + $versionString . '" is missing.'; if ( !isset($dependencyExtensionEntity) ||