@@ -52,27 +52,39 @@ protected function configure()
5252 // @codingStandardsIgnoreEnd
5353 }
5454
55- protected function execute (InputInterface $ input, OutputInterface $ output )
55+ protected function getExtraRequires (InputInterface $ input )
5656 {
57- $ options = $ input ->getOptions ();
58-
59- $ options ['require ' ] = array_merge ([
57+ $ require = [
6058 'cweagans/composer-patches ^1.6.0 ' ,
6159 'hussainweb/drupal-composer-helper ^1.0 ' ,
6260 $ input ->getOption ('core ' ),
6361 'drupal/console ^1.0.1 ' ,
6462 'drush/drush ~8.0|^9.0 ' ,
65- ], $ options ['require ' ]);
63+ ];
64+ return $ require ;
65+ }
6666
67- $ options ['require-dev ' ] = array_merge ([
67+ protected function getExtraRequireDevs (InputInterface $ input )
68+ {
69+ $ require_dev = [
6870 'behat/mink ~1.7 ' ,
6971 'behat/mink-goutte-driver ~1.2 ' ,
7072 'jcalderonzumba/gastonjs ~1.0.2 ' ,
7173 'jcalderonzumba/mink-phantomjs-driver ~0.3.1 ' ,
7274 'mikey179/vfsstream ~1.2 ' ,
7375 'phpunit/phpunit >=4.8.28 <5 ' ,
7476 'symfony/css-selector ~2.8 ' ,
75- ], $ options ['require-dev ' ]);
77+ ];
78+ return $ require_dev ;
79+ }
80+
81+ protected function execute (InputInterface $ input , OutputInterface $ output )
82+ {
83+ $ options = $ input ->getOptions ();
84+
85+ $ options ['require ' ] = array_merge ($ this ->getExtraRequires ($ input ), $ options ['require ' ]);
86+
87+ $ options ['require-dev ' ] = array_merge ($ this ->getExtraRequireDevs ($ input ), $ options ['require-dev ' ]);
7688
7789 $ input ->setOption ('require ' , $ options ['require ' ]);
7890 $ input ->setOption ('require-dev ' , $ options ['require-dev ' ]);
0 commit comments