Skip to content

Commit

Permalink
Use PhpUnit 8.5 when testing with nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jul 13, 2020
1 parent afbf69b commit 2d99350
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ env:

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

install:
Expand Down
2 changes: 1 addition & 1 deletion src/Command/RequireCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

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

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

Expand Down
7 changes: 4 additions & 3 deletions src/Command/UnpackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
$lockData['content-hash'] = $locker->getContentHash(file_get_contents($json->getPath()));
$lockFile = new JsonFile(substr($json->getPath(), 0, -4).'lock', null, $io);

if (!$input->getOption('dry-run')) {
$dryRun = $input->hasOption('dry-run') && !$input->getOption('dry-run');
if ($dryRun) {
$lockFile->write($lockData);
}

if ($input->getOption('no-install')) {
if ($input->hasOption('no-install') && $input->getOption('no-install')) {
return 0;
}

Expand All @@ -132,7 +133,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$composer->setLocker($locker);
$install = Installer::create($io, $composer);
$install
->setDryRun($input->getOption('dry-run') ?? false)
->setDryRun($dryRun)
->setDevMode(true)
->setDumpAutoloader(false)
->setRunScripts(false)
Expand Down

0 comments on commit 2d99350

Please sign in to comment.