Skip to content

Commit

Permalink
Fix: Adjust expression from upstream to sort composer-plugin-api corr…
Browse files Browse the repository at this point in the history
…ectly
  • Loading branch information
localheinz committed Mar 6, 2021
1 parent 57f50b5 commit 0e5baab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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].
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Vendor/Composer/PackageHashNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 0e5baab

Please sign in to comment.