src/MultiTester/Config.php
changed.
src/MultiTester/Project.php
changed.
49 | 49 | */ |
|
50 | 50 | public $verbose; |
|
51 | 51 | ||
52 | + | /** |
|
53 | + | * @var bool |
|
54 | + | */ |
|
55 | + | public $quiet; |
|
56 | + | ||
52 | 57 | /** |
|
53 | 58 | * @var string[] |
|
54 | 59 | */ |
67 | 72 | $arguments = $this->filterArguments($arguments, '--add'); |
|
68 | 73 | $this->tester = $multiTester; |
|
69 | 74 | $this->verbose = in_array('--verbose', $arguments) || in_array('-v', $arguments); |
|
75 | + | $this->quiet = in_array('--quiet-install', $arguments) || in_array('-q', $arguments); |
|
70 | 76 | $arguments = array_filter($arguments, function ($argument) { |
|
71 | 77 | return $argument !== '--verbose' && $argument !== '-v'; |
|
72 | 78 | }); |
208 | 208 | if (!isset($settings['clone'])) { |
|
209 | 209 | $this->seedSourceSetting($settings); |
|
210 | 210 | $this->checkSourceSetting($settings); |
|
211 | - | $settings['clone'] = ['git clone ' . $settings['source']['url'] . ' .']; |
|
211 | + | $settings['clone'] = ['git clone ' . $settings['source']['url'] . ' .'.($this->config->quiet ? ' --quiet' : '')]; |
|
212 | 212 | ||
213 | 213 | if (isset($settings['source']['reference'])) { |
|
214 | 214 | $settings['clone'][] = 'git checkout ' . $settings['source']['reference']; |
249 | 249 | */ |
|
250 | 250 | protected function seedInstallSetting(&$settings) |
|
251 | 251 | { |
|
252 | - | $this->seedSetting($settings, 'install', 'install script', 'composer install --no-interaction'); |
|
252 | + | $this->seedSetting($settings, 'install', 'install script', 'composer install --no-interaction'.($this->config->quiet ? ' --quiet' : '')); |
|
253 | 253 | } |
|
254 | 254 | ||
255 | 255 | /** |
267 | 267 | { |
|
268 | 268 | $settings = $this->getSettings(); |
|
269 | 269 | $package = $this->getPackage(); |
|
270 | - | $tester = $this->getConfig()->getTester(); |
|
270 | + | $config = $this->getConfig(); |
|
271 | + | $tester = $config->getTester(); |
|
271 | 272 | ||
272 | 273 | $this->seedCloneSetting($settings); |
|
273 | 274 | ||
274 | 275 | (new Directory('.'))->clean(); |
|
275 | 276 | $tester->info("empty current directory\n"); |
|
276 | 277 | ||
277 | - | $tester->framedInfo("Cloning $package"); |
|
278 | + | if (!$config->quiet) { |
|
279 | + | $tester->framedInfo("Cloning $package"); |
|
280 | + | } |
|
278 | 281 | ||
279 | 282 | if (!$tester->exec($settings['clone'])) { |
|
280 | 283 | throw new MultiTesterException("Cloning $package failed."); |
296 | 299 | ||
297 | 300 | $this->seedInstallSetting($settings); |
|
298 | 301 | ||
299 | - | $tester->framedInfo("Installing $package"); |
|
302 | + | if (!$config->quiet) { |
|
303 | + | $tester->framedInfo("Installing $package"); |
|
304 | + | } |
|
300 | 305 | ||
301 | 306 | if (!$tester->exec($settings['install'])) { |
|
302 | 307 | throw new MultiTesterException("Installing $package failed."); |
Files | Complexity | Coverage |
---|---|---|
src/MultiTester | 186 | 100.00% |
Project Totals (12 files) | 186 | 100.00% |
TRAVIS_PHP_VERSION=7.1 TRAVIS_OS_NAME=linux
TRAVIS_PHP_VERSION=5.6 TRAVIS_OS_NAME=linux
TRAVIS_PHP_VERSION=7.2 TRAVIS_OS_NAME=linux
TRAVIS_PHP_VERSION=7.0 TRAVIS_OS_NAME=linux
TRAVIS_PHP_VERSION=7.3 TRAVIS_OS_NAME=linux