Skip to content

Commit 1cea72f

Browse files
minor #658 Use PhpUnit 8.5 when testing with nightly (nicolas-grekas)
This PR was merged into the 1.8-dev branch. Discussion ---------- Use PhpUnit 8.5 when testing with nightly Commits ------- 2d99350 Use PhpUnit 8.5 when testing with nightly
2 parents afbf69b + 2d99350 commit 1cea72f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ env:
2424

2525
before_install:
2626
- ([[ $TRAVIS_PHP_VERSION = nightly ]] && composer config platform.php 7.4.99 || true)
27+
- [[ $TRAVIS_PHP_VERSION = nightly ]] && export SYMFONY_PHPUNIT_VERSION=8.5
2728
- composer validate
2829

2930
install:

src/Command/RequireCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
5353

5454
$ret = parent::execute($input, $output) ?? 0;
5555

56-
if (0 !== $ret || $input->getOption('no-unpack') || $input->getOption('no-update')) {
56+
if (0 !== $ret || $input->getOption('no-update')) {
5757
return $ret;
5858
}
5959

src/Command/UnpackCommand.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
115115
$lockData['content-hash'] = $locker->getContentHash(file_get_contents($json->getPath()));
116116
$lockFile = new JsonFile(substr($json->getPath(), 0, -4).'lock', null, $io);
117117

118-
if (!$input->getOption('dry-run')) {
118+
$dryRun = $input->hasOption('dry-run') && !$input->getOption('dry-run');
119+
if ($dryRun) {
119120
$lockFile->write($lockData);
120121
}
121122

122-
if ($input->getOption('no-install')) {
123+
if ($input->hasOption('no-install') && $input->getOption('no-install')) {
123124
return 0;
124125
}
125126

@@ -132,7 +133,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
132133
$composer->setLocker($locker);
133134
$install = Installer::create($io, $composer);
134135
$install
135-
->setDryRun($input->getOption('dry-run') ?? false)
136+
->setDryRun($dryRun)
136137
->setDevMode(true)
137138
->setDumpAutoloader(false)
138139
->setRunScripts(false)

0 commit comments

Comments
 (0)