diff --git a/src/Composer/DependencyResolver/GenericRule.php b/src/Composer/DependencyResolver/GenericRule.php index c86aa19cb..ab010db0e 100644 --- a/src/Composer/DependencyResolver/GenericRule.php +++ b/src/Composer/DependencyResolver/GenericRule.php @@ -77,7 +77,7 @@ class GenericRule extends Rule * * @return string */ - public function __toString() + public function __toString(): string { $result = $this->isDisabled() ? 'disabled(' : '('; diff --git a/src/Composer/DependencyResolver/MultiConflictRule.php b/src/Composer/DependencyResolver/MultiConflictRule.php index a7fcb0036..104d578a8 100644 --- a/src/Composer/DependencyResolver/MultiConflictRule.php +++ b/src/Composer/DependencyResolver/MultiConflictRule.php @@ -96,7 +96,7 @@ class MultiConflictRule extends Rule * * @return string */ - public function __toString() + public function __toString(): string { // TODO multi conflict? $result = $this->isDisabled() ? 'disabled(multi(' : '(multi('; diff --git a/src/Composer/DependencyResolver/Rule2Literals.php b/src/Composer/DependencyResolver/Rule2Literals.php index cbb40b220..9545686c8 100644 --- a/src/Composer/DependencyResolver/Rule2Literals.php +++ b/src/Composer/DependencyResolver/Rule2Literals.php @@ -108,7 +108,7 @@ class Rule2Literals extends Rule * * @return string */ - public function __toString() + public function __toString(): string { $result = $this->isDisabled() ? 'disabled(' : '('; diff --git a/src/Composer/Package/Link.php b/src/Composer/Package/Link.php index 75f744bd1..a7628a720 100644 --- a/src/Composer/Package/Link.php +++ b/src/Composer/Package/Link.php @@ -150,7 +150,7 @@ class Link /** * @return string */ - public function __toString() + public function __toString(): string { return $this->source.' '.$this->description.' '.$this->target.' ('.$this->constraint.')'; } diff --git a/src/Composer/Repository/PlatformRepository.php b/src/Composer/Repository/PlatformRepository.php index 4952d234c..461191e4a 100644 --- a/src/Composer/Repository/PlatformRepository.php +++ b/src/Composer/Repository/PlatformRepository.php @@ -327,8 +327,8 @@ class PlatformRepository extends ArrayRepository } // ICU TZData version => 2019c - if (Preg::isMatch('/^ICU TZData version => (?.*)$/im', $info, $zoneinfoMatches)) { - $this->addLibrary('icu-zoneinfo', Version::parseZoneinfoVersion($zoneinfoMatches['version']), 'zoneinfo ("Olson") database for icu'); + if (Preg::isMatch('/^ICU TZData version => (?.*)$/im', $info, $zoneinfoMatches) && null !== ($version = Version::parseZoneinfoVersion($zoneinfoMatches['version']))) { + $this->addLibrary('icu-zoneinfo', $version, 'zoneinfo ("Olson") database for icu'); } // Add a separate version for the CLDR library version