Merge branch '1.10'
commit
86cfbdc541
|
@ -20,6 +20,11 @@
|
||||||
* Fixed suggest output being very spammy, it now is only one line long and shows more rarely
|
* Fixed suggest output being very spammy, it now is only one line long and shows more rarely
|
||||||
* Fixed conflict rules like e.g. >=5 from matching dev-master, as it is not normalized to 9999999-dev internally anymore
|
* Fixed conflict rules like e.g. >=5 from matching dev-master, as it is not normalized to 9999999-dev internally anymore
|
||||||
|
|
||||||
|
### [1.10.5] 2020-04-10
|
||||||
|
|
||||||
|
* Fixed self-update on PHP <5.6, seriously please upgrade people, it's time
|
||||||
|
* Fixed 1.10.2 regression with PATH resolution in scripts
|
||||||
|
|
||||||
### [1.10.4] 2020-04-09
|
### [1.10.4] 2020-04-09
|
||||||
|
|
||||||
* Fixed 1.10.2 regression in path symlinking with absolute path repos
|
* Fixed 1.10.2 regression in path symlinking with absolute path repos
|
||||||
|
@ -863,6 +868,7 @@
|
||||||
|
|
||||||
* Initial release
|
* Initial release
|
||||||
|
|
||||||
|
[1.10.5]: https://github.com/composer/composer/compare/1.10.4...1.10.5
|
||||||
[1.10.4]: https://github.com/composer/composer/compare/1.10.3...1.10.4
|
[1.10.4]: https://github.com/composer/composer/compare/1.10.3...1.10.4
|
||||||
[1.10.3]: https://github.com/composer/composer/compare/1.10.2...1.10.3
|
[1.10.3]: https://github.com/composer/composer/compare/1.10.2...1.10.3
|
||||||
[1.10.2]: https://github.com/composer/composer/compare/1.10.1...1.10.2
|
[1.10.2]: https://github.com/composer/composer/compare/1.10.1...1.10.2
|
||||||
|
|
|
@ -85,7 +85,7 @@ EOT
|
||||||
|
|
||||||
// switch channel if requested
|
// switch channel if requested
|
||||||
$requestedChannel = null;
|
$requestedChannel = null;
|
||||||
foreach (Versions::CHANNELS as $channel) {
|
foreach (Versions::$channels as $channel) {
|
||||||
if ($input->getOption($channel)) {
|
if ($input->getOption($channel)) {
|
||||||
$requestedChannel = $channel;
|
$requestedChannel = $channel;
|
||||||
$versionsUtil->setChannel($channel);
|
$versionsUtil->setChannel($channel);
|
||||||
|
|
|
@ -248,6 +248,13 @@ class EventDispatcher
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if composer is being executed, make sure it runs the expected composer from current path
|
||||||
|
// resolution, even if bin-dir contains composer too because the project requires composer/composer
|
||||||
|
// see https://github.com/composer/composer/issues/8748
|
||||||
|
if (substr($exec, 0, 9) === 'composer ') {
|
||||||
|
$exec = $this->getPhpExecCommand() . ' ' . ProcessExecutor::escape(getenv('COMPOSER_BINARY')) . substr($exec, 8);
|
||||||
|
}
|
||||||
|
|
||||||
if (0 !== ($exitCode = $this->executeTty($exec))) {
|
if (0 !== ($exitCode = $this->executeTty($exec))) {
|
||||||
$this->io->writeError(sprintf('<error>Script %s handling the %s event returned with error code '.$exitCode.'</error>', $callable, $event->getName()), true, IOInterface::QUIET);
|
$this->io->writeError(sprintf('<error>Script %s handling the %s event returned with error code '.$exitCode.'</error>', $callable, $event->getName()), true, IOInterface::QUIET);
|
||||||
|
|
||||||
|
@ -535,10 +542,7 @@ class EventDispatcher
|
||||||
if (is_dir($binDir)) {
|
if (is_dir($binDir)) {
|
||||||
$binDir = realpath($binDir);
|
$binDir = realpath($binDir);
|
||||||
if (isset($_SERVER[$pathStr]) && !preg_match('{(^|'.PATH_SEPARATOR.')'.preg_quote($binDir).'($|'.PATH_SEPARATOR.')}', $_SERVER[$pathStr])) {
|
if (isset($_SERVER[$pathStr]) && !preg_match('{(^|'.PATH_SEPARATOR.')'.preg_quote($binDir).'($|'.PATH_SEPARATOR.')}', $_SERVER[$pathStr])) {
|
||||||
// prepend the COMPOSER_BINARY dir to the path to make sure that scripts running "composer" will run the expected composer
|
$_SERVER[$pathStr] = $binDir.PATH_SEPARATOR.getenv($pathStr);
|
||||||
// from current path resolution, even if bin-dir contains composer too because the project requires composer/composer
|
|
||||||
// see https://github.com/composer/composer/issues/8748
|
|
||||||
$_SERVER[$pathStr] = dirname(getenv('COMPOSER_BINARY')).PATH_SEPARATOR.$binDir.PATH_SEPARATOR.getenv($pathStr);
|
|
||||||
putenv($pathStr.'='.$_SERVER[$pathStr]);
|
putenv($pathStr.'='.$_SERVER[$pathStr]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ use Composer\Json\JsonFile;
|
||||||
*/
|
*/
|
||||||
class Versions
|
class Versions
|
||||||
{
|
{
|
||||||
const CHANNELS = array('stable', 'preview', 'snapshot', '1', '2');
|
public static $channels = array('stable', 'preview', 'snapshot', '1', '2');
|
||||||
|
|
||||||
private $httpDownloader;
|
private $httpDownloader;
|
||||||
private $config;
|
private $config;
|
||||||
|
@ -52,8 +52,8 @@ class Versions
|
||||||
|
|
||||||
public function setChannel($channel)
|
public function setChannel($channel)
|
||||||
{
|
{
|
||||||
if (!in_array($channel, self::CHANNELS, true)) {
|
if (!in_array($channel, self::$channels, true)) {
|
||||||
throw new \InvalidArgumentException('Invalid channel '.$channel.', must be one of: ' . implode(', ', self::CHANNELS));
|
throw new \InvalidArgumentException('Invalid channel '.$channel.', must be one of: ' . implode(', ', self::$channels));
|
||||||
}
|
}
|
||||||
|
|
||||||
$channelFile = $this->config->get('home').'/update-channel';
|
$channelFile = $this->config->get('home').'/update-channel';
|
||||||
|
|
Loading…
Reference in New Issue