main
Jordi Boggiano 8 years ago
parent 6825c04a62
commit 0ed5b541a9

@ -60,7 +60,7 @@ EOT
// First assemble lookup list of packages that are installed, replaced or provided // First assemble lookup list of packages that are installed, replaced or provided
$installed = array(); $installed = array();
foreach($packages as $package) { foreach ($packages as $package) {
$installed[] = $package['name']; $installed[] = $package['name'];
if (!empty($package['provide'])) { if (!empty($package['provide'])) {
@ -88,8 +88,9 @@ EOT
continue; continue;
} }
foreach ($package['suggest'] as $suggestion => $reason) { foreach ($package['suggest'] as $suggestion => $reason) {
if (false === strpos('/', $suggestion) && !is_null($platform->findPackage($suggestion, '*'))) if (false === strpos('/', $suggestion) && !is_null($platform->findPackage($suggestion, '*'))) {
continue; continue;
}
if (!isset($installed[$suggestion])) { if (!isset($installed[$suggestion])) {
$suggesters[$packageName][$suggestion] = $reason; $suggesters[$packageName][$suggestion] = $reason;
$suggested[$suggestion][$packageName] = $reason; $suggested[$suggestion][$packageName] = $reason;
@ -114,6 +115,7 @@ EOT
foreach (array_keys($suggested) as $suggestion) { foreach (array_keys($suggested) as $suggestion) {
$io->write(sprintf('<info>%s</info>', $suggestion)); $io->write(sprintf('<info>%s</info>', $suggestion));
} }
return; return;
} }

@ -12,7 +12,6 @@
namespace Composer\Downloader; namespace Composer\Downloader;
use Composer\Config;
use Composer\Package\PackageInterface; use Composer\Package\PackageInterface;
use Composer\IO\IOInterface; use Composer\IO\IOInterface;
use Composer\Util\Filesystem; use Composer\Util\Filesystem;
@ -313,6 +312,7 @@ class DownloadManager
if ('dist' === $preference || (!$package->isDev() && 'auto' === $preference)) { if ('dist' === $preference || (!$package->isDev() && 'auto' === $preference)) {
return 'dist'; return 'dist';
} }
return 'source'; return 'source';
} }
} }

@ -49,7 +49,7 @@ class PathDownloader extends FileDownloader
} }
// Get the transport options with default values // Get the transport options with default values
$transportOptions = $package->getTransportOptions() + array('symlink'=>null); $transportOptions = $package->getTransportOptions() + array('symlink' => null);
// When symlink transport option is null, both symlink and mirror are allowed // When symlink transport option is null, both symlink and mirror are allowed
$currentStrategy = self::STRATEGY_SYMLINK; $currentStrategy = self::STRATEGY_SYMLINK;
@ -58,7 +58,7 @@ class PathDownloader extends FileDownloader
if (true === $transportOptions['symlink']) { if (true === $transportOptions['symlink']) {
$currentStrategy = self::STRATEGY_SYMLINK; $currentStrategy = self::STRATEGY_SYMLINK;
$allowedStrategies = array(self::STRATEGY_SYMLINK); $allowedStrategies = array(self::STRATEGY_SYMLINK);
} elseif(false === $transportOptions['symlink']) { } elseif (false === $transportOptions['symlink']) {
$currentStrategy = self::STRATEGY_MIRROR; $currentStrategy = self::STRATEGY_MIRROR;
$allowedStrategies = array(self::STRATEGY_MIRROR); $allowedStrategies = array(self::STRATEGY_MIRROR);
} }

@ -88,12 +88,12 @@ class RootPackageLoader extends ArrayLoader
$config['source'] = array( $config['source'] = array(
'type' => '', 'type' => '',
'url' => '', 'url' => '',
'reference' => $commit 'reference' => $commit,
); );
$config['dist'] = array( $config['dist'] = array(
'type' => '', 'type' => '',
'url' => '', 'url' => '',
'reference' => $commit 'reference' => $commit,
); );
} }
} }

@ -136,8 +136,8 @@ class VersionGuesser
return $this->versionParser->normalize(trim($output)); return $this->versionParser->normalize(trim($output));
} catch (\Exception $e) { } catch (\Exception $e) {
} }
} }
return null; return null;
} }
@ -236,9 +236,9 @@ class VersionGuesser
} }
$version = $this->versionParser->normalize(trim($matches[1])); $version = $this->versionParser->normalize(trim($matches[1]));
return array('version' => $version, 'commit' => ''); return array('version' => $version, 'commit' => '');
} }
} }
} }
} }

@ -639,6 +639,7 @@ class Filesystem
* #define _S_IFREG 0x8000 * #define _S_IFREG 0x8000
*/ */
$stat = lstat($junction); $stat = lstat($junction);
return !($stat['mode'] & 0xC000); return !($stat['mode'] & 0xC000);
} }

@ -244,6 +244,7 @@ class Perforce
return $value; return $value;
} }
} }
return null; return null;
} else { } else {
$command = 'echo $' . $name; $command = 'echo $' . $name;

Loading…
Cancel
Save