Skip to content

Commit 55d1f65

Browse files
committed
B2B-1785: Cannot enable remote storage with install command when modules are not enabled
1 parent 12f6d3c commit 55d1f65

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

setup/src/Magento/Setup/Model/Installer.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
use Magento\Setup\Validator\DbValidator;
5757
use Magento\Store\Model\Store;
5858
use Magento\RemoteStorage\Setup\ConfigOptionsList as RemoteStorageValidator;
59+
use ReflectionException;
5960

6061
/**
6162
* Class Installer contains the logic to install Magento application.
@@ -1219,7 +1220,12 @@ public function installSearchConfiguration($data)
12191220
*/
12201221
public function validateRemoteStorageConfiguration(array $data)
12211222
{
1222-
$remoteStorageValidator = $this->objectManagerProvider->get()->get(RemoteStorageValidator::class);
1223+
try {
1224+
$remoteStorageValidator = $this->objectManagerProvider->get()->get(RemoteStorageValidator::class);
1225+
} catch (ReflectionException $e) { // RemoteStorage module is not enabled; return early
1226+
return;
1227+
}
1228+
12231229
$validationErrors = $remoteStorageValidator->validate($data, $this->deploymentConfig);
12241230

12251231
if (!empty($validationErrors)) {

0 commit comments

Comments
 (0)