diff --git a/CHANGELOG.md b/CHANGELOG.md index bf447af40..8126cf5b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +### [1.3.1] - 2017-01-07 + + * Fixed dist downloads from Bitbucket + * Fixed some regressions related to xdebug disabling + * Fixed `--minor-only` flag in `outdated` command + * Fixed handling of config.platform.php which did not replace other php-* package's versions + ### [1.3.0] - 2016-12-24 * Fixed handling of annotated git tags vs lightweight tags leading to useless updates sometimes @@ -477,6 +484,7 @@ * Initial release +[1.3.1]: https://github.com/composer/composer/compare/1.3.0...1.3.1 [1.3.0]: https://github.com/composer/composer/compare/1.3.0-RC...1.3.0 [1.3.0-RC]: https://github.com/composer/composer/compare/1.2.4...1.3.0-RC [1.2.4]: https://github.com/composer/composer/compare/1.2.3...1.2.4 diff --git a/src/Composer/Plugin/PluginManager.php b/src/Composer/Plugin/PluginManager.php index 80b5b91ea..bb67e03a6 100644 --- a/src/Composer/Plugin/PluginManager.php +++ b/src/Composer/Plugin/PluginManager.php @@ -223,9 +223,13 @@ class PluginManager /** * Adds a plugin, activates it and registers it with the event dispatcher * + * Ideally plugin packages should be registered via registerPackage, but if you use Composer + * programmatically and want to register a plugin class directly this is a valid way + * to do it. + * * @param PluginInterface $plugin plugin instance */ - private function addPlugin(PluginInterface $plugin) + public function addPlugin(PluginInterface $plugin) { $this->io->writeError('Loading plugin '.get_class($plugin), true, IOInterface::DEBUG); $this->plugins[] = $plugin; diff --git a/src/Composer/Repository/ArtifactRepository.php b/src/Composer/Repository/ArtifactRepository.php index 50a08241f..a8002123a 100644 --- a/src/Composer/Repository/ArtifactRepository.php +++ b/src/Composer/Repository/ArtifactRepository.php @@ -27,6 +27,7 @@ class ArtifactRepository extends ArrayRepository implements ConfigurableReposito protected $lookup; protected $repoConfig; + private $io; public function __construct(array $repoConfig, IOInterface $io) { diff --git a/src/Composer/Repository/Vcs/GitHubDriver.php b/src/Composer/Repository/Vcs/GitHubDriver.php index b33b99916..ed4155c01 100644 --- a/src/Composer/Repository/Vcs/GitHubDriver.php +++ b/src/Composer/Repository/Vcs/GitHubDriver.php @@ -152,14 +152,16 @@ class GitHubDriver extends VcsDriver } $composer = $this->getBaseComposerInformation($identifier); + if ($composer) { - // specials for github - if (!isset($composer['support']['source'])) { - $label = array_search($identifier, $this->getTags()) ?: array_search($identifier, $this->getBranches()) ?: $identifier; - $composer['support']['source'] = sprintf('https://%s/%s/%s/tree/%s', $this->originUrl, $this->owner, $this->repository, $label); - } - if (!isset($composer['support']['issues']) && $this->hasIssues) { - $composer['support']['issues'] = sprintf('https://%s/%s/%s/issues', $this->originUrl, $this->owner, $this->repository); + // specials for github + if (!isset($composer['support']['source'])) { + $label = array_search($identifier, $this->getTags()) ?: array_search($identifier, $this->getBranches()) ?: $identifier; + $composer['support']['source'] = sprintf('https://%s/%s/%s/tree/%s', $this->originUrl, $this->owner, $this->repository, $label); + } + if (!isset($composer['support']['issues']) && $this->hasIssues) { + $composer['support']['issues'] = sprintf('https://%s/%s/%s/issues', $this->originUrl, $this->owner, $this->repository); + } } if ($this->shouldCache($identifier)) { diff --git a/src/Composer/XdebugHandler.php b/src/Composer/XdebugHandler.php index a55d37368..fb0570925 100644 --- a/src/Composer/XdebugHandler.php +++ b/src/Composer/XdebugHandler.php @@ -136,6 +136,7 @@ class XdebugHandler { $this->tmpIni = ''; $iniPaths = IniHelper::getAll(); + $additional = count($iniPaths) > 1; if (empty($iniPaths[0])) { // There is no loaded ini @@ -143,7 +144,7 @@ class XdebugHandler } if ($this->writeTmpIni($iniPaths)) { - return $this->setEnvironment($iniPaths); + return $this->setEnvironment($additional, $iniPaths); } return false; @@ -193,15 +194,14 @@ class XdebugHandler /** * Returns true if the restart environment variables were set * + * @param bool $additional Whether there were additional inis * @param array $iniPaths Locations used by the current prcoess * * @return bool */ - private function setEnvironment(array $iniPaths) + private function setEnvironment($additional, array $iniPaths) { // Set scan dir to an empty value if additional ini files were used - $additional = count($iniPaths) > 1; - if ($additional && !putenv('PHP_INI_SCAN_DIR=')) { return false; }