From 1f261f1f7a2d08f72312c716ea4acc538259d67f Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 17 Jan 2020 11:44:17 +0100 Subject: [PATCH 1/3] Update changelog --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 091ba77fc..07ee13703 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +### [1.10.0] 2020-01-XX + + * Breaking: `composer global exec ...` now executes the process in the current working directory instead of executing it in the global directory. + * Warning: Added a warning when class names are being loaded by a PSR-4 or PSR-0 rule only due to classmap optimization, but would not otherwise be autoloadable. The next minor version will stop autoloading these classes so make sure you fix your autoload configs. + * Added support for configuring suggestions using config command, e.g. `composer config suggest.foo/bar some text` + * Added support for configuring fine-grained preferred-install using config command, e.g. `composer config preferred-install.foo/* dist` + * Added `@putenv` script handler to set environment variables from composer.json for following scripts + * Added `lock` option that can be set to false, in which case no composer.lock file will be generated + * Added support for IPv6 addresses in NO_PROXY + * Added package homepage display in the show command + * Added debug info about HTTP authentications + * Added Symfony 5 compatibility + * Added --fixed flag to require command to make it use a fixed constraint instead of a ^x.y constraint when adding the requirement + * Fixed GitHub deprecation of access_token query parameter, now using Authorization header + * Fixed archive command to persist file permissions inside the zip files + * Fixed init/require command to avoid suggesting packages which are already selected in the search results + * Fixed create-project UX issues + ### [1.9.2] 2020-01-14 * Fixed minor git driver bugs @@ -783,6 +801,7 @@ * Initial release +[1.10.0]: https://github.com/composer/composer/compare/1.9.2...1.10.0 [1.9.2]: https://github.com/composer/composer/compare/1.9.1...1.9.2 [1.9.1]: https://github.com/composer/composer/compare/1.9.0...1.9.1 [1.9.0]: https://github.com/composer/composer/compare/1.8.6...1.9.0 From b9d00153d9431d75496b048a6a4dcd4d278b1eaf Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 17 Jan 2020 14:52:07 +0100 Subject: [PATCH 2/3] Suggest using -p when a platform package can not be found in show command --- src/Composer/Command/ShowCommand.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index 441fe6818..78a418a33 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -201,6 +201,9 @@ EOT if (empty($package)) { $options = $input->getOptions(); if (!isset($options['working-dir']) || !file_exists('composer.json')) { + if (preg_match(PlatformRepository::PLATFORM_PACKAGE_REGEX, $input->getArgument('package')) && !$input->getOption('platform')) { + throw new \InvalidArgumentException('Package ' . $packageFilter . ' not found, try using --platform (-p) to show platform packages.'); + } throw new \InvalidArgumentException('Package ' . $packageFilter . ' not found'); } From 7d7e3d594befc601797d4a986c4a88e600868092 Mon Sep 17 00:00:00 2001 From: Patrick Weyck Date: Tue, 14 Jan 2020 15:39:11 +0100 Subject: [PATCH 3/3] Normalize minimum-stability `rc` to `RC` in `InitCommand` A `minimum-stability` of `rc` is valid according to `composer-schema.json` and works fine with install and update and generally in version comparisons, because it's normalized to `RC`. This commit makes it work in `InitCommand` and `RequireCommand` too. --- src/Composer/Command/InitCommand.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index 440187ae8..d234a8cba 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -16,6 +16,7 @@ use Composer\DependencyResolver\Pool; use Composer\Factory; use Composer\Json\JsonFile; use Composer\Package\BasePackage; +use Composer\Package\Package; use Composer\Package\Version\VersionParser; use Composer\Package\Version\VersionSelector; use Composer\Repository\CompositeRepository; @@ -702,13 +703,13 @@ EOT private function getMinimumStability(InputInterface $input) { if ($input->hasOption('stability')) { - return $input->getOption('stability') ?: 'stable'; + return VersionParser::normalizeStability($input->getOption('stability') ?: 'stable'); } $file = Factory::getComposerFile(); if (is_file($file) && is_readable($file) && is_array($composer = json_decode(file_get_contents($file), true))) { if (!empty($composer['minimum-stability'])) { - return $composer['minimum-stability']; + return VersionParser::normalizeStability($composer['minimum-stability']); } }