diff --git a/CHANGELOG.md b/CHANGELOG.md index 60a57fca..7420bdd1 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 [`4.2.0...main`][4.2.0...main]. +### Changed + +- Sort `allow-plugins` and `preferred-install` as sensibly as is feasible ([#980]), by [@fredden] + ## [`4.2.0`][4.2.0] For a full diff see [`4.1.0...4.2.0`][4.1.0...4.2.0]. @@ -630,6 +634,7 @@ For a full diff see [`5d8b3e2...0.1.0`][5d8b3e2...0.1.0]. [#873]: https://github.com/ergebnis/json-normalizer/pull/873 [#889]: https://github.com/ergebnis/json-normalizer/pull/889 [#917]: https://github.com/ergebnis/json-normalizer/pull/917 +[#980]: https://github.com/ergebnis/json-normalizer/pull/980 [@alexis-saransig-lullabot]: https://github.com/alexis-saransig-lullabot [@BackEndTea]: https://github.com/BackEndTea diff --git a/README.md b/README.md index a100fdbb..0bea2399 100644 --- a/README.md +++ b/README.md @@ -435,6 +435,8 @@ When `composer.json` contains an array of scripts in the `bin` section, the `Ven When `composer.json` contains configuration in the `config` section, the `Vendor\Composer\ConfigHashNormalizer` will sort the content of these sections by key in ascending order. +The `allow-plugins` and `preferred-install` keys have special handling as they both support wildcards. When no wildcards are used, these are sorted in ascending order. When wildcards are in use, then the list will be sorted if possible (ie, when the wildcards are only at the end of package names). Due to internal implementation details of the wildcard feature within Composer, sorting keys when there are wildcards part-way through is not feasible. + :bulb: Find out more about the `config` section at [Composer: The composer.json schema](https://getcomposer.org/doc/06-config.md). #### `Vendor\Composer\PackageHashNormalizer` diff --git a/src/Vendor/Composer/ConfigHashNormalizer.php b/src/Vendor/Composer/ConfigHashNormalizer.php index 108e2d59..04464aa4 100644 --- a/src/Vendor/Composer/ConfigHashNormalizer.php +++ b/src/Vendor/Composer/ConfigHashNormalizer.php @@ -19,6 +19,11 @@ final class ConfigHashNormalizer implements Normalizer { + private const PROPERTIES_WITH_WILDCARDS = [ + 'allow-plugins', + 'preferred-install', + ]; + public function normalize(Json $json): Json { $decoded = $json->decoded(); @@ -44,6 +49,12 @@ public function normalize(Json $json): Json \ksort($config); + foreach (self::PROPERTIES_WITH_WILDCARDS as $property) { + if (isset($config[$property]) && \is_object($config[$property])) { + self::sortPropertyWithWildcard($config, $property); + } + } + $decoded->config = $config; /** @var string $encoded */ @@ -54,4 +65,35 @@ public function normalize(Json $json): Json return Json::fromString($encoded); } + + /** + * When sorting with wildcards, special care needs to be taken. + * + * See also https://github.com/ergebnis/json-normalizer/pull/775#issuecomment-1346095415 + */ + private static function sortPropertyWithWildcard(array &$config, string $propertyToSort): void + { + $property = (array) $config[$propertyToSort]; + + if ([] === $property) { + return; + } + + foreach (\array_keys($property) as $package) { + if (\str_contains(\rtrim((string) $package, '*'), '*')) { + // We cannot reliably sort allow-plugins when there's a wildcard other than at the end of the string. + return; + } + } + + \uksort($property, static function ($a, $b): int { + // Any key with an asterisk needs to be the last entry in its group + $a = \str_replace('*', '~', (string) $a); + $b = \str_replace('*', '~', (string) $b); + + return \strcmp($a, $b); + }); + + $config[$propertyToSort] = $property; + } } diff --git a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/IsUseful/Yes/normalized.json b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/No/normalized.json similarity index 85% rename from test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/IsUseful/Yes/normalized.json rename to test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/No/normalized.json index e974c27f..57c8a0fd 100644 --- a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/IsUseful/Yes/normalized.json +++ b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/No/normalized.json @@ -17,8 +17,8 @@ "config": { "allow-plugins": { "composer/package-versions-deprecated": true, - "infection/extension-installer": true, - "composer/*": false + "ergebnis/composer-normalize": true, + "infection/extension-installer": true } } } diff --git a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/IsUseful/No/original.json b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/No/original.json similarity index 92% rename from test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/IsUseful/No/original.json rename to test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/No/original.json index fe643b79..382e89b8 100644 --- a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/IsUseful/No/original.json +++ b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/No/original.json @@ -16,8 +16,8 @@ "homepage": "https://getcomposer.org/doc/06-config.md#allow-plugins", "config": { "allow-plugins": { - "composer/*": false, "infection/extension-installer": true, + "ergebnis/composer-normalize": true, "composer/package-versions-deprecated": true } } diff --git a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/No/normalized.json b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/No/normalized.json new file mode 100644 index 00000000..e85042db --- /dev/null +++ b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/No/normalized.json @@ -0,0 +1,26 @@ +{ + "name": "ergebnis/json-normalizer", + "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", + "license": "MIT", + "type": "library", + "keywords": [ + "json", + "normalizer" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "homepage": "https://getcomposer.org/doc/06-config.md#allow-plugins", + "config": { + "allow-plugins": { + "ergebnis/composer-normalize": true, + "composer/unwanted-plugin-1-test": false, + "composer/*-test": true, + "composer/unwanted-plugin-2-test": false, + "infection/extension-installer": true + } + } +} diff --git a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/No/original.json b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/No/original.json new file mode 100644 index 00000000..617b7f8c --- /dev/null +++ b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/No/original.json @@ -0,0 +1,26 @@ +{ + "name": "ergebnis/json-normalizer", + "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", + "license": "MIT", + "type": "library", + "keywords": [ + "json", + "normalizer" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "homepage": "https://getcomposer.org/doc/06-config.md#allow-plugins", + "config": { + "allow-plugins": { + "ergebnis/composer-normalize": true, + "composer/unwanted-plugin-1-test": false, + "composer/*-test": true, + "composer/unwanted-plugin-2-test": false, + "infection/extension-installer": true + } + } +} diff --git a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/IsUseful/No/normalized.json b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/Yes/normalized.json similarity index 77% rename from test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/IsUseful/No/normalized.json rename to test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/Yes/normalized.json index 9dedb469..994a6a2d 100644 --- a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/IsUseful/No/normalized.json +++ b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/Yes/normalized.json @@ -16,9 +16,10 @@ "homepage": "https://getcomposer.org/doc/06-config.md#allow-plugins", "config": { "allow-plugins": { + "composer/package-versions-deprecated": true, "composer/*": false, - "infection/extension-installer": true, - "composer/package-versions-deprecated": true + "ergebnis/composer-normalize": true, + "infection/extension-installer": true } } } diff --git a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/IsUseful/Yes/original.json b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/Yes/original.json similarity index 93% rename from test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/IsUseful/Yes/original.json rename to test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/Yes/original.json index 2edfdf6b..7eedba7a 100644 --- a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/IsUseful/Yes/original.json +++ b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/AllowPlugins/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/Yes/original.json @@ -16,6 +16,7 @@ "homepage": "https://getcomposer.org/doc/06-config.md#allow-plugins", "config": { "allow-plugins": { + "ergebnis/composer-normalize": true, "composer/package-versions-deprecated": true, "infection/extension-installer": true, "composer/*": false diff --git a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/No/normalized.json b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/No/normalized.json new file mode 100644 index 00000000..d0567eb7 --- /dev/null +++ b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/No/normalized.json @@ -0,0 +1,25 @@ +{ + "name": "ergebnis/json-normalizer", + "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", + "license": "MIT", + "type": "library", + "keywords": [ + "json", + "normalizer" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "homepage": "https://getcomposer.org/doc/06-config.md#preferred-install", + "config": { + "preferred-install": { + "foo/four": "source", + "foo/one": "source", + "foo/three": "source", + "foo/two": "source" + } + } +} diff --git a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/No/original.json b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/No/original.json new file mode 100644 index 00000000..978c36d6 --- /dev/null +++ b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/No/original.json @@ -0,0 +1,25 @@ +{ + "name": "ergebnis/json-normalizer", + "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", + "license": "MIT", + "type": "library", + "keywords": [ + "json", + "normalizer" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "homepage": "https://getcomposer.org/doc/06-config.md#preferred-install", + "config": { + "preferred-install": { + "foo/one": "source", + "foo/two": "source", + "foo/three": "source", + "foo/four": "source" + } + } +} diff --git a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/IsUseful/No/normalized.json b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/No/normalized.json similarity index 90% rename from test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/IsUseful/No/normalized.json rename to test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/No/normalized.json index 1b48bd54..165a82b8 100644 --- a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/IsUseful/No/normalized.json +++ b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/No/normalized.json @@ -16,9 +16,9 @@ "homepage": "https://getcomposer.org/doc/06-config.md#preferred-install", "config": { "preferred-install": { - "*": "dist", - "foo/*": "dist", "foo/something-longer-but-alphabetically-after-package-*": "source", + "foo/package-two": "dist", + "foo/*-test": "source", "foo/package-*": "source", "foo/package-one": "dist" } diff --git a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/IsUseful/Yes/original.json b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/No/original.json similarity index 85% rename from test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/IsUseful/Yes/original.json rename to test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/No/original.json index 10f77250..3cb6f6a9 100644 --- a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/IsUseful/Yes/original.json +++ b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/No/original.json @@ -17,10 +17,10 @@ "config": { "preferred-install": { "foo/something-longer-but-alphabetically-after-package-*": "source", - "foo/package-one": "dist", + "foo/package-two": "dist", + "foo/*-test": "source", "foo/package-*": "source", - "foo/*": "dist", - "*": "dist" + "foo/package-one": "dist" } } } diff --git a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/IsUseful/Yes/normalized.json b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/Yes/normalized.json similarity index 100% rename from test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/IsUseful/Yes/normalized.json rename to test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/Yes/normalized.json index 73e23035..aadcbafc 100644 --- a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/IsUseful/Yes/normalized.json +++ b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/Yes/normalized.json @@ -16,9 +16,9 @@ "homepage": "https://getcomposer.org/doc/06-config.md#preferred-install", "config": { "preferred-install": { - "foo/something-longer-but-alphabetically-after-package-*": "source", "foo/package-one": "dist", "foo/package-*": "source", + "foo/something-longer-but-alphabetically-after-package-*": "source", "foo/*": "dist", "*": "dist" } diff --git a/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/IsUseful/No/original.json b/test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/Yes/original.json similarity index 100% rename from test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/IsUseful/No/original.json rename to test/Fixture/Vendor/Composer/ComposerJsonNormalizer/NormalizeNormalizesJson/Json/IsObject/HasEntries/Yes/HasProperty/Config/HasEntries/Yes/HasProperty/PreferredInstall/IsObject/HasEntries/Yes/HasWildcard/Yes/WildcardIsAtEnd/Yes/original.json