Skip to content

Commit

Permalink
Add the compatibility with Composer 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
francoispluchino committed Aug 8, 2019
1 parent ee835cf commit a5679e4
Show file tree
Hide file tree
Showing 4 changed files with 250 additions and 136 deletions.
16 changes: 15 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,56 @@ matrix:
env: COMPOSER_VERSION="1.7.*"
- php: 5.5
env: COMPOSER_VERSION="1.8.*"
- php: 5.5
env: COMPOSER_VERSION="1.9.*"
- php: 5.6
env: COMPOSER_VERSION="1.6.*"
- php: 5.6
env: COMPOSER_VERSION="1.7.*"
- php: 5.6
env: COMPOSER_VERSION="1.8.*"
- php: 5.6
env: COMPOSER_VERSION="1.9.*"
- php: 7.0
env: COMPOSER_VERSION="1.6.*"
- php: 7.0
env: COMPOSER_VERSION="1.7.*"
- php: 7.0
env: COMPOSER_VERSION="1.8.*"
- php: 7.0
env: COMPOSER_VERSION="1.9.*"
- php: 7.1
env: COMPOSER_VERSION="1.6.*"
- php: 7.1
env: COMPOSER_VERSION="1.7.*"
- php: 7.1
env: COMPOSER_VERSION="1.8.*"
- php: 7.1
env: COMPOSER_VERSION="1.9.*"
- php: 7.2
env: COMPOSER_VERSION="1.6.*"
- php: 7.2
env: COMPOSER_VERSION="1.7.*"
- php: 7.2
env: COMPOSER_VERSION="1.8.*"
- php: 7.2
env: COMPOSER_VERSION="1.9.*"
- php: 7.3
env: COMPOSER_VERSION="1.6.*"
- php: 7.3
env: COMPOSER_VERSION="1.7.*"
- php: 7.3
env: COMPOSER_VERSION="1.8.*"
- php: 7.3
env: COMPOSER_VERSION="1.9.*"
- php: nightly
env: COMPOSER_VERSION="1.6.*"
- php: nightly
env: COMPOSER_VERSION="1.7.*"
- php: nightly
env: COMPOSER_VERSION="1.8.*"
- php: nightly
env: COMPOSER_VERSION="1.9.*"

allow_failures:
- php: nightly
Expand All @@ -60,7 +74,7 @@ matrix:

before_script:
- composer self-update
- composer global require --prefer-source phpunit/phpunit:"^4.8 || ^5.7.0 || ^6.5.0" php-coveralls/php-coveralls:^2.1.0
- composer global require --prefer-source phpunit/phpunit:"^4.8 || ^5.7.0 || ^6.5.0 || ^7.5.0" php-coveralls/php-coveralls:^2.1.0
- if [ "$COMPOSER_VERSION" == "" ]; then composer install --prefer-source; fi;
- if [ "$COMPOSER_VERSION" != "" ]; then composer require "composer/composer:${COMPOSER_VERSION}" --no-update; fi;
- if [ "$COMPOSER_VERSION" != "" ]; then composer update --prefer-source; fi;
Expand Down
2 changes: 1 addition & 1 deletion Repository/AbstractAssetVcsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ protected function initRootIdentifier(VcsDriverInterface $driver)
}
}
} catch (\Exception $e) {
if ($this->verbose) {
if ($this->io->isVerbose()) {
$this->io->write('<error>Skipped parsing '.$driver->getRootIdentifier().', '.$e->getMessage().'</error>');
}
}
Expand Down
6 changes: 3 additions & 3 deletions Repository/AssetVcsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function initTags(VcsDriverInterface $driver)
$this->initTag($driver, $packageName, $tag, $identifier);
}

if (!$this->verbose) {
if (!$this->io->isVerbose()) {
$this->io->overwrite('', false);
}
}
Expand All @@ -106,7 +106,7 @@ protected function initTag(VcsDriverInterface $driver, $packageName, $tag, $iden
}

if (!$parsedTag = Validator::validateTag($tag, $this->assetType, $this->versionParser)) {
if ($this->verbose) {
if ($this->io->isVerbose()) {
$this->io->write('<warning>Skipped tag '.$tag.', invalid tag name</warning>');
}

Expand Down Expand Up @@ -164,7 +164,7 @@ protected function initBranches(VcsDriverInterface $driver)
$this->preInitBranchLazyPackage($driver, $branch, $identifier);
}

if (!$this->verbose) {
if (!$this->io->isVerbose()) {
$this->io->overwrite('', false);
}
}
Expand Down
Loading

0 comments on commit a5679e4

Please sign in to comment.