1
0
Fork 0

Improve error reporting for RULE_PACKAGE_ALIAS

pull/8916/head
Jordi Boggiano 2020-06-02 10:35:04 +02:00
parent 0ea9eafcaf
commit 2ddf4346ef
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 5 additions and 2 deletions

View File

@ -288,7 +288,10 @@ abstract class Rule
return 'Conclusion: '.$ruleText.$learnedString;
case self::RULE_PACKAGE_ALIAS:
return $ruleText;
$aliasPackage = $this->deduplicateMasterAlias($pool->literalToPackage($literals[0]));
$package = $this->deduplicateMasterAlias($pool->literalToPackage($literals[1]));
return $aliasPackage->getPrettyString() .' is an alias of '.$package->getPrettyString().' and thus requires it to be installed too.';
default:
return '('.$ruleText.')';
}

View File

@ -35,7 +35,7 @@ Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires beyondcode/laravel-dump-server ^1.3 -> satisfiable by beyondcode/laravel-dump-server[1.4.0].
- You can only install one version of a package, so only one of these can be installed: symfony/var-dumper[dev-master, 4.4.0].
- don't install symfony/var-dumper 5.2.x-dev|install symfony/var-dumper dev-master
- symfony/var-dumper 5.2.x-dev is an alias of symfony/var-dumper dev-master and thus requires it to be installed too.
- laravel/framework 6.8.14 requires symfony/var-dumper ^4.3.4 -> satisfiable by symfony/var-dumper[4.4.0].
- beyondcode/laravel-dump-server 1.4.0 requires symfony/var-dumper ^5.0 -> satisfiable by symfony/var-dumper[5.2.x-dev (alias of dev-master)].
- Root composer.json requires laravel/framework ^6.8 -> satisfiable by laravel/framework[6.8.14].