Allow to specify composer version
Showing 2 of 11 files from the diff.
src/MultiTester/MultiTester.php
changed.
src/MultiTester/Project.php
changed.
Other files ignored by Codecov
tests/MultiTesterTest.php
has changed.
.github/workflows/tests.yml
is new.
.gitignore
has changed.
bin/multi-tester
has changed.
.github/FUNDING.yml
is new.
composer.json
has changed.
tests/ProjectTest.php
has changed.
.travis.yml
was deleted.
.github/workflows/coverage.yml
is new.
@@ -242,6 +242,24 @@
Loading
242 | 242 | $this->asArray($settings['clone']); |
|
243 | 243 | } |
|
244 | 244 | ||
245 | + | protected function getComposerProgram($settings) |
|
246 | + | { |
|
247 | + | if (isset($settings['composer'])) { |
|
248 | + | $version = $settings['composer']; |
|
249 | + | ||
250 | + | if (!file_exists("composer-$version.phar")) { |
|
251 | + | copy( |
|
252 | + | "https://getcomposer.org/download/$version/composer.phar", |
|
253 | + | "composer-$version.phar" |
|
254 | + | ); |
|
255 | + | } |
|
256 | + | ||
257 | + | return "composer-$version.phar"; |
|
258 | + | } |
|
259 | + | ||
260 | + | return 'composer'; |
|
261 | + | } |
|
262 | + | ||
245 | 263 | /** |
|
246 | 264 | * @param array $settings |
|
247 | 265 | */ |
@@ -277,7 +295,9 @@
Loading
277 | 295 | $settings, |
|
278 | 296 | 'autoload', |
|
279 | 297 | 'autoload build script', |
|
280 | - | 'composer dump-autoload --optimize --no-interaction' . ($this->config->quiet ? ' --quiet' : '') |
|
298 | + | $this->getComposerProgram($settings) . |
|
299 | + | ' dump-autoload --optimize --no-interaction' . |
|
300 | + | ($this->config->quiet ? ' --quiet' : '') |
|
281 | 301 | ); |
|
282 | 302 | } |
|
283 | 303 |
@@ -290,7 +310,9 @@
Loading
290 | 310 | $settings, |
|
291 | 311 | 'install', |
|
292 | 312 | 'install script', |
|
293 | - | 'composer install --no-interaction' . ($this->config->quiet ? ' --quiet' : '') |
|
313 | + | $this->getComposerProgram($settings) . |
|
314 | + | ' install --no-interaction' . |
|
315 | + | ($this->config->quiet ? ' --quiet' : '') |
|
294 | 316 | ); |
|
295 | 317 | } |
|
296 | 318 |
Files | Coverage |
---|---|
src/MultiTester | 100.00% |
Project Totals (13 files) | 100.00% |
1431810156
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.