1
0
Fork 0

Merge branch '1.1'

pull/5383/merge
Jordi Boggiano 2016-05-31 19:51:30 +01:00
commit d1425ec008
6 changed files with 43 additions and 7 deletions

View File

@ -1,3 +1,10 @@
### [1.1.2] - 2016-05-31
* Fixed degraded mode issue when accessing packagist.org
* Fixed GitHub access_token being added on subsequent requests in case of redirections
* Fixed exclude-from-classmap not working in some circumstances
* Fixed openssl warning preventing the use of config command for disabling tls
### [1.1.1] - 2016-05-17 ### [1.1.1] - 2016-05-17
* Fixed regression in handling of #reference which made it update every time * Fixed regression in handling of #reference which made it update every time
@ -390,6 +397,7 @@
* Initial release * Initial release
[1.1.2]: https://github.com/composer/composer/compare/1.1.1...1.1.2
[1.1.1]: https://github.com/composer/composer/compare/1.1.0...1.1.1 [1.1.1]: https://github.com/composer/composer/compare/1.1.0...1.1.1
[1.1.0]: https://github.com/composer/composer/compare/1.0.3...1.1.0 [1.1.0]: https://github.com/composer/composer/compare/1.0.3...1.1.0
[1.1.0-RC]: https://github.com/composer/composer/compare/1.0.3...1.1.0-RC [1.1.0-RC]: https://github.com/composer/composer/compare/1.0.3...1.1.0-RC

View File

@ -810,7 +810,7 @@ INITIALIZER;
if ($type === 'exclude-from-classmap') { if ($type === 'exclude-from-classmap') {
// first escape user input // first escape user input
$path = preg_quote(trim(strtr($path, '\\', '/'), '/')); $path = preg_replace('{/+}', '/', preg_quote(trim(strtr($path, '\\', '/'), '/')));
// add support for wildcards * and ** // add support for wildcards * and **
$path = str_replace('\\*\\*', '.+?', $path); $path = str_replace('\\*\\*', '.+?', $path);

View File

@ -86,6 +86,8 @@ class ClassMapGenerator
if (!$filesystem->isAbsolutePath($filePath)) { if (!$filesystem->isAbsolutePath($filePath)) {
$filePath = $cwd . '/' . $filePath; $filePath = $cwd . '/' . $filePath;
$filePath = $filesystem->normalizePath($filePath); $filePath = $filesystem->normalizePath($filePath);
} else {
$filePath = preg_replace('{[\\\\/]{2,}}', '/', $filePath);
} }
if ($blacklist && preg_match($blacklist, strtr($filePath, '\\', '/'))) { if ($blacklist && preg_match($blacklist, strtr($filePath, '\\', '/'))) {

View File

@ -28,6 +28,7 @@ use Composer\IO\ConsoleIO;
use Composer\Json\JsonValidationException; use Composer\Json\JsonValidationException;
use Composer\Util\ErrorHandler; use Composer\Util\ErrorHandler;
use Composer\EventDispatcher\ScriptExecutionException; use Composer\EventDispatcher\ScriptExecutionException;
use Composer\Exception\NoSslException;
/** /**
* The console application that handles the commands * The console application that handles the commands
@ -127,13 +128,18 @@ class Application extends BaseApplication
} }
if (!$input->hasParameterOption('--no-plugins') && !$this->hasPluginCommands && 'global' !== $commandName) { if (!$input->hasParameterOption('--no-plugins') && !$this->hasPluginCommands && 'global' !== $commandName) {
foreach ($this->getPluginCommands() as $command) { try {
if ($this->has($command->getName())) { foreach ($this->getPluginCommands() as $command) {
$io->writeError('<warning>Plugin command '.$command->getName().' ('.get_class($command).') would override a Composer command and has been skipped</warning>'); if ($this->has($command->getName())) {
} else { $io->writeError('<warning>Plugin command '.$command->getName().' ('.get_class($command).') would override a Composer command and has been skipped</warning>');
$this->add($command); } else {
$this->add($command);
}
} }
} catch (NoSslException $e) {
// suppress these as they are not relevant at this point
} }
$this->hasPluginCommands = true; $this->hasPluginCommands = true;
} }

View File

@ -0,0 +1,20 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Exception;
/**
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
class NoSslException extends \RuntimeException
{
}

View File

@ -571,7 +571,7 @@ class Factory
$warned = true; $warned = true;
$disableTls = true; $disableTls = true;
} elseif (!extension_loaded('openssl')) { } elseif (!extension_loaded('openssl')) {
throw new \RuntimeException('The openssl extension is required for SSL/TLS protection but is not available. ' throw new Exception\NoSslException('The openssl extension is required for SSL/TLS protection but is not available. '
. 'If you can not enable the openssl extension, you can disable this error, at your own risk, by setting the \'disable-tls\' option to true.'); . 'If you can not enable the openssl extension, you can disable this error, at your own risk, by setting the \'disable-tls\' option to true.');
} }
$remoteFilesystemOptions = array(); $remoteFilesystemOptions = array();