Skip to content

Commit

Permalink
Fix: Adjust ComposerJsonNormalizer to stop sorting config.preferred-i…
Browse files Browse the repository at this point in the history
…nstall
  • Loading branch information
localheinz committed Dec 12, 2022
1 parent e4b9559 commit 58585f9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ For a full diff see [`3.0.0...main`][3.0.0...main].
- Adjusted `Vendor\Composer\ComposerJsonNormalizer` to stop sorting `scripts.auto-scripts` ([#776]), by [@localheinz]
- Adjusted `Vendor\Composer\ComposerJsonNormalizer` to stop sorting `extra.installer-paths` ([#777]), by [@localheinz]
- Adjusted `Vendor\Composer\ComposerJsonNormalizer` to stop sorting `config.allow-plugins` ([#778]), by [@localheinz]
- Adjusted `Vendor\Composer\ComposerJsonNormalizer` to stop sorting `config.preferred-install` ([#779]), by [@localheinz]

### Removed

Expand Down
1 change: 1 addition & 0 deletions src/Vendor/Composer/ComposerJsonNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function __construct(string $schemaUri)
new SchemaValidator\SchemaValidator(),
Pointer\Specification::anyOf(
Pointer\Specification::equals(Pointer\JsonPointer::fromJsonString('/config/allow-plugins')),
Pointer\Specification::equals(Pointer\JsonPointer::fromJsonString('/config/preferred-install')),
Pointer\Specification::equals(Pointer\JsonPointer::fromJsonString('/extra/installer-paths')),
Pointer\Specification::equals(Pointer\JsonPointer::fromJsonString('/scripts/auto-scripts')),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"homepage": "https://getcomposer.org/doc/06-config.md#preferred-install",
"config": {
"preferred-install": {
"*": "dist",
"foo/something-longer-but-alphabetically-after-package-*": "source",
"foo/*": "dist",
"foo/package-*": "source",
"foo/package-one": "dist",
"foo/something-longer-but-alphabetically-after-package-*": "source"
"*": "dist"
}
}
}

0 comments on commit 58585f9

Please sign in to comment.