@@ -23,16 +23,6 @@ class ApplicationDumpCommand extends Command
2323{
2424 const INPUT_CONFIG_TYPES = 'config-types ' ;
2525
26- /**
27- * @var array
28- */
29- private $ configTypes = [
30- \Magento \Store \App \Config \Type \Scopes::CONFIG_TYPE ,
31- \Magento \Deploy \Source \Themes::TYPE ,
32- \Magento \Translation \App \Config \Type \Translation::CONFIG_TYPE ,
33- \Magento \Config \App \Config \Type \System::CONFIG_TYPE ,
34- ];
35-
3626 /**
3727 * @var Writer
3828 */
@@ -60,10 +50,10 @@ public function __construct(
6050 array $ sources ,
6151 Hash $ configHash = null
6252 ) {
63- parent ::__construct ();
6453 $ this ->writer = $ writer ;
6554 $ this ->sources = $ sources ;
6655 $ this ->configHash = $ configHash ?: ObjectManager::getInstance ()->get (Hash::class);
56+ parent ::__construct ();
6757 }
6858
6959 /**
@@ -73,10 +63,12 @@ protected function configure()
7363 {
7464 $ this ->setName ('app:config:dump ' );
7565 $ this ->setDescription ('Create dump of application ' );
66+
67+ $ configTypes = array_unique (array_column ($ this ->sources , 'namespace ' ));
7668 $ this ->addArgument (
7769 self ::INPUT_CONFIG_TYPES ,
7870 InputArgument::OPTIONAL | InputArgument::IS_ARRAY ,
79- sprintf ('Space-separated list of config types or omit to dump all [%s] ' , implode (', ' , $ this -> configTypes ))
71+ sprintf ('Space-separated list of config types or omit to dump all [%s] ' , implode (', ' , $ configTypes ))
8072 );
8173 parent ::configure ();
8274 }
0 commit comments