Merge branch '1.0'
commit
aed818fda2
|
@ -117,6 +117,14 @@ class Application extends BaseApplication
|
|||
}
|
||||
|
||||
if ($commandName !== 'global') {
|
||||
$io->writeError(sprintf(
|
||||
'Running %s (%s) with %s on %s',
|
||||
Composer::VERSION,
|
||||
Composer::RELEASE_DATE,
|
||||
defined('HHVM_VERSION') ? 'HHVM '.HHVM_VERSION : 'PHP '.PHP_VERSION,
|
||||
php_uname('s') . ' / ' . php_uname('r')
|
||||
), true, IOInterface::DEBUG);
|
||||
|
||||
if (PHP_VERSION_ID < 50302) {
|
||||
$io->writeError('<warning>Composer only officially supports PHP 5.3.2 and above, you will most likely encounter problems with your PHP '.PHP_VERSION.', upgrading is strongly recommended.</warning>');
|
||||
}
|
||||
|
|
|
@ -130,11 +130,11 @@ class Problem
|
|||
}
|
||||
|
||||
if ($providers = $this->pool->whatProvides($job['packageName'], $job['constraint'], true, true)) {
|
||||
return "\n - The requested package ".$job['packageName'].$this->constraintToText($job['constraint']).' is satisfiable by '.$this->getPackageList($providers).' but those are rejected by your minimum-stability.';
|
||||
return "\n - The requested package ".$job['packageName'].$this->constraintToText($job['constraint']).' is satisfiable by '.$this->getPackageList($providers).' but these conflict with your requirements or minimum-stability.';
|
||||
}
|
||||
|
||||
if ($providers = $this->pool->whatProvides($job['packageName'], null, true, true)) {
|
||||
return "\n - The requested package ".$job['packageName'].$this->constraintToText($job['constraint']).' exists as '.$this->getPackageList($providers).' but those are rejected by your constraint.';
|
||||
return "\n - The requested package ".$job['packageName'].$this->constraintToText($job['constraint']).' exists as '.$this->getPackageList($providers).' but these are rejected by your constraint.';
|
||||
}
|
||||
|
||||
return "\n - The requested package ".$job['packageName'].' could not be found in any version, there may be a typo in the package name.';
|
||||
|
|
|
@ -241,7 +241,7 @@ class Rule
|
|||
return $text . ' -> the requested linked library '.$lib.' has the wrong version installed or is missing from your system, make sure to have the extension providing it.';
|
||||
} else {
|
||||
if ($providers = $pool->whatProvides($targetName, $this->reasonData->getConstraint(), true, true)) {
|
||||
return $text . ' -> satisfiable by ' . $this->formatPackagesUnique($pool, $providers) .' but these conflict with your requirements or minimum-stability';
|
||||
return $text . ' -> satisfiable by ' . $this->formatPackagesUnique($pool, $providers) .' but these conflict with your requirements or minimum-stability.';
|
||||
}
|
||||
|
||||
return $text . ' -> no matching package found.';
|
||||
|
|
|
@ -448,6 +448,7 @@ class Installer
|
|||
$candidates = array();
|
||||
foreach ($links as $link) {
|
||||
$candidates[$link->getTarget()] = true;
|
||||
$rootRequires[$link->getTarget()] = $link;
|
||||
}
|
||||
foreach ($localRepo->getPackages() as $package) {
|
||||
$candidates[$package->getName()] = true;
|
||||
|
@ -459,6 +460,9 @@ class Installer
|
|||
if ($curPackage->getName() === $candidate) {
|
||||
if (!$this->isUpdateable($curPackage) && !isset($removedUnstablePackages[$curPackage->getName()])) {
|
||||
$constraint = new Constraint('=', $curPackage->getVersion());
|
||||
$description = $this->locker->isLocked() ? '(locked at' : '(installed at';
|
||||
$requiredAt = isset($rootRequires[$candidate]) ? ', required as ' . $rootRequires[$candidate]->getPrettyConstraint() : '';
|
||||
$constraint->setPrettyString($description . ' ' . $curPackage->getPrettyVersion() . $requiredAt . ')');
|
||||
$request->install($curPackage->getName(), $constraint);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -30,6 +30,9 @@ class ApplicationTest extends TestCase
|
|||
->will($this->returnValue('list'));
|
||||
|
||||
$index = 0;
|
||||
$outputMock->expects($this->at($index++))
|
||||
->method("writeError");
|
||||
|
||||
if (extension_loaded('xdebug')) {
|
||||
$outputMock->expects($this->at($index++))
|
||||
->method("getVerbosity")
|
||||
|
|
|
@ -10,7 +10,9 @@ Test the error output of solver problems.
|
|||
{ "name": "unstable/package", "version": "1.0.0" },
|
||||
{ "name": "requirer", "version": "1.0.0", "require": {"dependency": "1.0.0" } },
|
||||
{ "name": "dependency", "version": "2.0.0" },
|
||||
{ "name": "dependency", "version": "1.0.0" }
|
||||
{ "name": "dependency", "version": "1.0.0" },
|
||||
{ "name": "stable-requiree-excluded", "version": "1.0.1" },
|
||||
{ "name": "stable-requiree-excluded", "version": "1.0.0" }
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -18,12 +20,18 @@ Test the error output of solver problems.
|
|||
"unstable/package": "2.*",
|
||||
"bogus": "1.*",
|
||||
"requirer": "1.*",
|
||||
"dependency": "2.*"
|
||||
"dependency": "2.*",
|
||||
"stable-requiree-excluded": "1.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
--INSTALLED--
|
||||
[
|
||||
{ "name": "stable-requiree-excluded", "version": "1.0.0" }
|
||||
]
|
||||
|
||||
--RUN--
|
||||
install
|
||||
update unstable/package requirer dependency
|
||||
|
||||
--EXPECT-EXIT-CODE--
|
||||
2
|
||||
|
@ -34,12 +42,14 @@ Updating dependencies (including require-dev)
|
|||
Your requirements could not be resolved to an installable set of packages.
|
||||
|
||||
Problem 1
|
||||
- The requested package unstable/package 2.* exists as unstable/package[1.0.0] but those are rejected by your constraint.
|
||||
- The requested package unstable/package 2.* exists as unstable/package[1.0.0] but these are rejected by your constraint.
|
||||
Problem 2
|
||||
- The requested package bogus could not be found in any version, there may be a typo in the package name.
|
||||
Problem 3
|
||||
- The requested package stable-requiree-excluded (installed at 1.0.0, required as 1.0.1) is satisfiable by stable-requiree-excluded[1.0.0] but these conflict with your requirements or minimum-stability.
|
||||
Problem 4
|
||||
- Installation request for requirer 1.* -> satisfiable by requirer[1.0.0].
|
||||
- requirer 1.0.0 requires dependency 1.0.0 -> satisfiable by dependency[1.0.0] but these conflict with your requirements or minimum-stability
|
||||
- requirer 1.0.0 requires dependency 1.0.0 -> satisfiable by dependency[1.0.0] but these conflict with your requirements or minimum-stability.
|
||||
|
||||
Potential causes:
|
||||
- A typo in the package name
|
||||
|
|
Loading…
Reference in New Issue