diff --git a/dev/tests/setup-integration/framework/Magento/TestFramework/Deploy/CliCommand.php b/dev/tests/setup-integration/framework/Magento/TestFramework/Deploy/CliCommand.php index 6c7fc0017d3da..bb7cee695ed2c 100644 --- a/dev/tests/setup-integration/framework/Magento/TestFramework/Deploy/CliCommand.php +++ b/dev/tests/setup-integration/framework/Magento/TestFramework/Deploy/CliCommand.php @@ -117,6 +117,7 @@ public function disableModule($moduleName) * @return void * @throws LocalizedException * @deprecated split database solution is deprecated and will be removed + * @see Nothing */ public function splitQuote() { @@ -141,6 +142,7 @@ public function splitQuote() * @return void * @throws LocalizedException * @deprecated split database solution is deprecated and will be removed + * @see Nothing */ public function splitSales() { @@ -199,7 +201,9 @@ private function toCliArguments(array $params) $result = []; foreach ($params as $key => $value) { - if (!empty($value)) { + if ($value === $key) { + $result["--{$key}"] = null; + } elseif (!empty($value)) { $result["--{$key}=%s"] = $value; } } diff --git a/dev/tests/setup-integration/testsuite/Magento/Setup/DryRunTest.php b/dev/tests/setup-integration/testsuite/Magento/Setup/DryRunTest.php index 191ba635a35b6..29e3cfcddf62e 100644 --- a/dev/tests/setup-integration/testsuite/Magento/Setup/DryRunTest.php +++ b/dev/tests/setup-integration/testsuite/Magento/Setup/DryRunTest.php @@ -43,7 +43,7 @@ public function testDryRunOnCleanDatabase() $logFileName = TESTS_TEMP_DIR . '/var/log/' . DryRunLogger::FILE_NAME; $this->cliCommad->install( ['Magento_TestSetupDeclarationModule1'], - ['dry-run' => true] + ['dry-run' => 'dry-run'] ); self::assertFileExists($logFileName); $data = file_get_contents($logFileName); @@ -64,7 +64,7 @@ public function testDryRunOnUpgrade() 'db_schema.xml', 'etc' ); - $this->cliCommad->upgrade(['dry-run' => true]); + $this->cliCommad->upgrade(['dry-run' => 'dry-run']); self::assertFileExists($logFileName); $data = file_get_contents($logFileName); self::assertEquals($this->getData()[0], $data); diff --git a/setup/src/Magento/Setup/Console/Command/InstallCommand.php b/setup/src/Magento/Setup/Console/Command/InstallCommand.php index 1f716043c3846..23c21e54ff271 100644 --- a/setup/src/Magento/Setup/Console/Command/InstallCommand.php +++ b/setup/src/Magento/Setup/Console/Command/InstallCommand.php @@ -215,9 +215,8 @@ protected function configure() new InputOption( DryRunLogger::INPUT_KEY_DRY_RUN_MODE, null, - InputOption::VALUE_OPTIONAL, - 'Magento Installation will be run in dry-run mode', - false + InputOption::VALUE_NONE, + 'Magento Installation will be run in dry-run mode' ), ]); $this->setName('setup:install') diff --git a/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php b/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php index 84a0897ace10d..aa1063efdc7e3 100644 --- a/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php +++ b/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php @@ -120,9 +120,8 @@ protected function configure() new InputOption( DryRunLogger::INPUT_KEY_DRY_RUN_MODE, null, - InputOption::VALUE_OPTIONAL, - 'Magento Installation will be run in dry-run mode', - false + InputOption::VALUE_NONE, + 'Magento Installation will be run in dry-run mode' ) ]; $this->setName('setup:upgrade')