From 0e5baab681876e612ec0317eb0c611a4930307c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sat, 6 Mar 2021 11:41:49 +0100 Subject: [PATCH] Fix: Adjust expression from upstream to sort composer-plugin-api correctly --- CHANGELOG.md | 5 +++++ src/Vendor/Composer/PackageHashNormalizer.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc0b9d88..e254414c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), For a full diff see [`1.0.2...main`][1.0.2...main]. +### Fixed + +* Adjusted `Vendor\Composer\PackageHashNormalizer` to take into account the newly addded `composer-plugin-api` as platform requirement ([#463]), by [@localheinz] + ## [`1.0.2`][1.0.2] For a full diff see [`1.0.1...1.0.2`][1.0.1...1.0.2]. @@ -400,6 +404,7 @@ For a full diff see [`5d8b3e2...0.1.0`][5d8b3e2...0.1.0]. [#424]: https://github.com/ergebnis/json-normalizer/pull/424 [#425]: https://github.com/ergebnis/json-normalizer/pull/425 [#429]: https://github.com/ergebnis/json-normalizer/pull/429 +[#463]: https://github.com/ergebnis/json-normalizer/pull/463 [@BackEndTea]: https://github.com/BackEndTea [@ergebnis]: https://github.com/ergebnis diff --git a/src/Vendor/Composer/PackageHashNormalizer.php b/src/Vendor/Composer/PackageHashNormalizer.php index ea754a1e..a35a5261 100644 --- a/src/Vendor/Composer/PackageHashNormalizer.php +++ b/src/Vendor/Composer/PackageHashNormalizer.php @@ -19,9 +19,9 @@ final class PackageHashNormalizer implements NormalizerInterface { /** - * @see https://github.com/composer/composer/blob/1.6.2/src/Composer/Repository/PlatformRepository.php#L27 + * @see https://github.com/composer/composer/blob/2.0.11/src/Composer/Repository/PlatformRepository.php#L33 */ - private const PLATFORM_PACKAGE_REGEX = '{^(?:php(?:-64bit|-ipv6|-zts|-debug)?|hhvm|(?:ext|lib)-[^/ ]+)$}i'; + private const PLATFORM_PACKAGE_REGEX = '{^(?:php(?:-64bit|-ipv6|-zts|-debug)?|hhvm|(?:ext|lib)-[a-z0-9](?:[_.-]?[a-z0-9]+)*|composer-(?:plugin|runtime)-api)$}iD'; private const PROPERTIES_THAT_SHOULD_BE_NORMALIZED = [ 'conflict',