From 41de6ef47b32c3ba00f89b6c3bda67c82beb1f21 Mon Sep 17 00:00:00 2001
From: Maddy Chellathurai <mchellathura@ebay.com>
Date: Thu, 7 May 2015 15:21:02 -0500
Subject: [PATCH] MAGETWO-36920: Use dashes instead of underscores in option
 names

- base-url
- use-rewrites
- use-secure
- base-url-secure
- cleanup-database
- sales-order-increment-prefix
- use-sample-data
- magento-init-params
---
 .../config/install-config-mysql.php.dist               | 10 +++++-----
 .../framework/Magento/TestFramework/Application.php    |  4 ++--
 dev/tests/performance/config.php.dist                  |  6 +++---
 .../framework/Magento/TestFramework/Application.php    |  2 +-
 .../Setup/Console/Command/AbstractSetupCommand.php     |  2 +-
 .../Magento/Setup/Console/Command/InstallCommand.php   |  6 +++---
 .../Setup/Model/StoreConfigurationDataMapper.php       |  8 ++++----
 .../Magento/Setup/Mvc/Bootstrap/InitParamListener.php  |  2 +-
 .../Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php  |  2 +-
 9 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/dev/tests/api-functional/config/install-config-mysql.php.dist b/dev/tests/api-functional/config/install-config-mysql.php.dist
index 159ab87e76c..2f19ce10e80 100644
--- a/dev/tests/api-functional/config/install-config-mysql.php.dist
+++ b/dev/tests/api-functional/config/install-config-mysql.php.dist
@@ -14,9 +14,9 @@ return [
     'db-user'                      => 'root',
     'db-password'                  => '',
     'backend-frontname'            => 'backend',
-    'base_url'                     => 'http://localhost/',
-    'use_secure'                   => '0',
-    'use_rewrites'                 => '0',
+    'base-url'                     => 'http://localhost/',
+    'use-secure'                   => '0',
+    'use-rewrites'                 => '0',
     'admin-lastname'               => 'Admin',
     'admin-firstname'              => 'Admin',
     'admin-email'                  => 'admin@example.com',
@@ -24,7 +24,7 @@ return [
     'admin-password'               => '123123q',
     'admin-use-security-key'       => '0',
     /* PayPal has limitation for order number - 20 characters. 10 digits prefix + 8 digits number is good enough */
-    'sales_order_increment_prefix' => time(),
+    'sales-order-increment-prefix' => time(),
     'session-save'                 => 'db',
-    'cleanup_database'             => true,
+    'cleanup-database'             => true,
 ];
diff --git a/dev/tests/integration/framework/Magento/TestFramework/Application.php b/dev/tests/integration/framework/Magento/TestFramework/Application.php
index 59cd2c536d4..0d3b591efda 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/Application.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/Application.php
@@ -379,7 +379,7 @@ class Application
          * @see \Magento\Setup\Mvc\Bootstrap\InitParamListener::BOOTSTRAP_PARAM
          */
         $this->_shell->execute(
-            'php -f %s setup:uninstall -n --magento_init_params=%s',
+            'php -f %s setup:uninstall -n --magento-init-params=%s',
             [BP . '/bin/magento', $this->getInitParamsQuery()]
         );
     }
@@ -466,7 +466,7 @@ class Application
          * Literal value is used instead of constant, because autoloader is not integrated with Magento Setup app
          * @see \Magento\Setup\Mvc\Bootstrap\InitParamListener::BOOTSTRAP_PARAM
          */
-        $params['magento_init_params'] = $this->getInitParamsQuery();
+        $params['magento-init-params'] = $this->getInitParamsQuery();
         $result = [];
         foreach ($params as $key => $value) {
             if (!empty($value)) {
diff --git a/dev/tests/performance/config.php.dist b/dev/tests/performance/config.php.dist
index 57c1111221d..38d6e043060 100644
--- a/dev/tests/performance/config.php.dist
+++ b/dev/tests/performance/config.php.dist
@@ -17,9 +17,9 @@ return array(
                 'db-name'                    => 'magento',
                 'db-user'                    => 'root',
                 'db-password'                => '',
-                'use_secure'                 => '0',
+                'use-secure'                 => '0',
                 'use-secure-admin'           => '0',
-                'use_rewrites'               => '0',
+                'use-rewrites'               => '0',
                 'admin-lastname'             => 'Admin',
                 'admin-firstname'            => 'Admin',
                 'admin-email'                => 'admin@example.com',
@@ -29,7 +29,7 @@ return array(
                 'backend-frontname'          => 'backend',
             ),
             'options_no_value' => array(
-                'cleanup_database',
+                'cleanup-database',
             ),
         ),
     ),
diff --git a/dev/tests/performance/framework/Magento/TestFramework/Application.php b/dev/tests/performance/framework/Magento/TestFramework/Application.php
index d236858ef25..89da64b48f5 100644
--- a/dev/tests/performance/framework/Magento/TestFramework/Application.php
+++ b/dev/tests/performance/framework/Magento/TestFramework/Application.php
@@ -156,7 +156,7 @@ class Application
 
         // Populate install options with global options
         $baseUrl = 'http://' . $this->_config->getApplicationUrlHost() . $this->_config->getApplicationUrlPath();
-        $installOptions = array_merge($installOptions, ['base_url' => $baseUrl, 'base_url_secure' => $baseUrl]);
+        $installOptions = array_merge($installOptions, ['base-url' => $baseUrl, 'base-url-secure' => $baseUrl]);
         $installCmd = 'php -f %s setup:install';
         $installCmdArgs = [$this->_script];
         foreach ($installOptions as $optionName => $optionValue) {
diff --git a/setup/src/Magento/Setup/Console/Command/AbstractSetupCommand.php b/setup/src/Magento/Setup/Console/Command/AbstractSetupCommand.php
index 3b8975c02de..7803cacfed5 100644
--- a/setup/src/Magento/Setup/Console/Command/AbstractSetupCommand.php
+++ b/setup/src/Magento/Setup/Console/Command/AbstractSetupCommand.php
@@ -11,7 +11,7 @@ use Symfony\Component\Console\Input\InputOption;
 
 /**
  * An abstract class for all Magento Setup command.
- * It adds InitParamListener's magento_init_params option to all setup command.
+ * It adds InitParamListener's magento-init-params option to all setup command.
  */
 abstract class AbstractSetupCommand extends Command
 {
diff --git a/setup/src/Magento/Setup/Console/Command/InstallCommand.php b/setup/src/Magento/Setup/Console/Command/InstallCommand.php
index 2601e45b7aa..0f32e2b4562 100644
--- a/setup/src/Magento/Setup/Console/Command/InstallCommand.php
+++ b/setup/src/Magento/Setup/Console/Command/InstallCommand.php
@@ -20,17 +20,17 @@ class InstallCommand extends AbstractSetupCommand
     /**
      * Parameter indicating command whether to cleanup database in the install routine
      */
-    const INPUT_KEY_CLEANUP_DB = 'cleanup_database';
+    const INPUT_KEY_CLEANUP_DB = 'cleanup-database';
 
     /**
      * Parameter to specify an order_increment_prefix
      */
-    const INPUT_KEY_SALES_ORDER_INCREMENT_PREFIX = 'sales_order_increment_prefix';
+    const INPUT_KEY_SALES_ORDER_INCREMENT_PREFIX = 'sales-order-increment-prefix';
 
     /**
      * Parameter indicating command whether to install Sample Data
      */
-    const INPUT_KEY_USE_SAMPLE_DATA = 'use_sample_data';
+    const INPUT_KEY_USE_SAMPLE_DATA = 'use-sample-data';
 
     /**
      * Installer service factory
diff --git a/setup/src/Magento/Setup/Model/StoreConfigurationDataMapper.php b/setup/src/Magento/Setup/Model/StoreConfigurationDataMapper.php
index 8d3c5172611..11a3a36e4cd 100644
--- a/setup/src/Magento/Setup/Model/StoreConfigurationDataMapper.php
+++ b/setup/src/Magento/Setup/Model/StoreConfigurationDataMapper.php
@@ -22,10 +22,10 @@ class StoreConfigurationDataMapper
     /**#@+
      * Model data keys
      */
-    const KEY_USE_SEF_URL = 'use_rewrites';
-    const KEY_BASE_URL = 'base_url';
-    const KEY_BASE_URL_SECURE = 'base_url_secure';
-    const KEY_IS_SECURE = 'use_secure';
+    const KEY_USE_SEF_URL = 'use-rewrites';
+    const KEY_BASE_URL = 'base-url';
+    const KEY_BASE_URL_SECURE = 'base-url-secure';
+    const KEY_IS_SECURE = 'use-secure';
     const KEY_IS_SECURE_ADMIN = 'use-secure-admin';
     const KEY_LANGUAGE = 'language';
     const KEY_TIMEZONE = 'timezone';
diff --git a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php
index 1d229e825f9..e2525c9e4fb 100644
--- a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php
+++ b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php
@@ -30,7 +30,7 @@ class InitParamListener implements ListenerAggregateInterface, FactoryInterface
     /**
      * A CLI parameter for injecting bootstrap variables
      */
-    const BOOTSTRAP_PARAM = 'magento_init_params';
+    const BOOTSTRAP_PARAM = 'magento-init-params';
 
     /**
      * List of ZF event listeners
diff --git a/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php b/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php
index 778c734d7e5..d0e06963c70 100644
--- a/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Mvc/Bootstrap/InitParamListenerTest.php
@@ -119,7 +119,7 @@ class InitParamListenerTest extends \PHPUnit_Framework_TestCase
         $request->expects($this->any())
             ->method('getContent')
             ->willReturn(
-                $cliParam ? ['install', '--magento_init_params=' . $cliParam ] : ['install']
+                $cliParam ? ['install', '--magento-init-params=' . $cliParam ] : ['install']
             );
         $mvcApplication->expects($this->any())->method('getConfig')->willReturn(
             $zfAppConfig ? [InitParamListener::BOOTSTRAP_PARAM => $zfAppConfig]:[]
-- 
GitLab