1
0
Fork 0

Merge branch '1.6'

pull/7032/merge
Jordi Boggiano 2018-01-24 10:20:12 +01:00
commit dae3c5bc2d
3 changed files with 22 additions and 2 deletions

View File

@ -11,6 +11,7 @@
*/
namespace Composer\DependencyResolver;
use Composer\Package\CompletePackageInterface;
/**
* Represents a problem detected while solving dependencies
@ -90,8 +91,17 @@ class Problem
// handle php/hhvm
if ($job['packageName'] === 'php' || $job['packageName'] === 'php-64bit' || $job['packageName'] === 'hhvm') {
$version = phpversion();
$available = $this->pool->whatProvides($job['packageName']);
$version = count($available) ? $available[0]->getPrettyVersion() : phpversion();
if (count($available)) {
$firstAvailable = reset($available);
$version = $firstAvailable->getPrettyVersion();
$extra = $firstAvailable->getExtra();
if ($firstAvailable instanceof CompletePackageInterface && isset($extra['config.platform']) && $extra['config.platform'] === true) {
$version .= '; ' . $firstAvailable->getDescription();
}
}
$msg = "\n - This package requires ".$job['packageName'].$this->constraintToText($job['constraint']).' but ';

View File

@ -289,7 +289,16 @@ class ConsoleIO extends BaseIO
$question->setErrorMessage($errorMessage);
$question->setMultiselect($multiselect);
return $helper->ask($this->input, $this->getErrorOutput(), $question);
$result = $helper->ask($this->input, $this->getErrorOutput(), $question);
$results = array();
foreach ($choices as $index => $choice) {
if (in_array($choice, $result, true)) {
$results[] = (string) $index;
}
}
return $results;
}
/**

View File

@ -665,6 +665,7 @@ class Filesystem
* Stat cache should be cleared before to avoid accidentally reading wrong information from previous installs.
*/
clearstatcache(true, $junction);
clearstatcache(false);
$stat = lstat($junction);
return !($stat['mode'] & 0xC000);