Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Remove ConfigHashNormalizer #775

Merged
merged 1 commit into from Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -17,6 +17,7 @@ For a full diff see [`3.0.0...main`][3.0.0...main].
### Removed

- Started using `ergebnis/json` and removed `Json` and `Exception\InvalidJsonEncoded` ([#772]), by [@localheinz]
- Removed `Normalizer\Vendor\Composer\ConfigHashNormalizer` ([#775]), by [@localheinz]

## [`3.0.0`][3.0.0]

Expand Down Expand Up @@ -522,6 +523,7 @@ For a full diff see [`5d8b3e2...0.1.0`][5d8b3e2...0.1.0].
[#757]: https://github.com/ergebnis/json-normalizer/pull/757
[#772]: https://github.com/ergebnis/json-normalizer/pull/772
[#774]: https://github.com/ergebnis/json-normalizer/pull/774
[#775]: https://github.com/ergebnis/json-normalizer/pull/775

[@BackEndTea]: https://github.com/BackEndTea
[@dependabot]: https://github.com/dependabot
Expand Down
13 changes: 0 additions & 13 deletions README.md
Expand Up @@ -458,7 +458,6 @@ The `Vendor\Composer\ComposerJsonNormalizer` can be used to normalize a `compose
It composes the following normalizers:

- [`Ergebnis\Composer\Json\Normalizer\Vendor\Composer\BinNormalizer`](#vendorcomposerbinnormalizer)
- [`Ergebnis\Composer\Json\Normalizer\Vendor\Composer\ConfigHashNormalizer`](#vendorcomposerconfighashnormalizer)
- [`Ergebnis\Composer\Json\Normalizer\Vendor\Composer\PackageHashNormalizer`](#vendorcomposerpackagehashnormalizer)
- [`Ergebnis\Composer\Json\Normalizer\Vendor\Composer\VersionConstraintNormalizer`](#vendorcomposerversionconstraintnormalizer)

Expand All @@ -468,18 +467,6 @@ When `composer.json` contains an array of scripts in the `bin` section, the `Ven

:bulb: Find out more about the `bin` section at [Composer: The composer.json schema](https://getcomposer.org/doc/04-schema.md#bin).

#### `Vendor\Composer\ConfigHashNormalizer`

When `composer.json` contains any configuration in the

- `config`
- `extra`
- `scripts-descriptions`

sections, the `Vendor\Composer\ConfigHashNormalizer` will sort the content of these sections by key in ascending order. If a value is an object, it will continue to sort its properties by name.

:bulb: Find out more about the `config` section at [Composer: The composer.json schema](https://getcomposer.org/doc/06-config.md).

#### `Vendor\Composer\PackageHashNormalizer`

When `composer.json` contains any configuration in the
Expand Down
4 changes: 2 additions & 2 deletions infection.json
Expand Up @@ -3,8 +3,8 @@
"logs": {
"text": ".build/infection/infection-log.txt"
},
"minCoveredMsi": 91,
"minMsi": 87,
"minCoveredMsi": 90,
"minMsi": 86,
"phpUnit": {
"configDir": "test\/Unit"
},
Expand Down
14 changes: 0 additions & 14 deletions psalm-baseline.xml
Expand Up @@ -32,15 +32,6 @@
<code>$value</code>
</MixedAssignment>
</file>
<file src="src/Vendor/Composer/ConfigHashNormalizer.php">
<MixedArgument occurrences="2">
<code>$value</code>
<code>$value</code>
</MixedArgument>
<MixedAssignment occurrences="1">
<code>$value</code>
</MixedAssignment>
</file>
<file src="src/Vendor/Composer/PackageHashNormalizer.php">
<MixedAssignment occurrences="1">
<code>$value</code>
Expand Down Expand Up @@ -161,11 +152,6 @@
<code>$property-&gt;getValue($normalizer)</code>
</MixedReturnStatement>
</file>
<file src="test/Unit/Vendor/Composer/ConfigHashNormalizerTest.php">
<MixedInferredReturnType occurrences="1">
<code>\Generator&lt;array&lt;string&gt;&gt;</code>
</MixedInferredReturnType>
</file>
<file src="test/Unit/Vendor/Composer/PackageHashNormalizerTest.php">
<MixedInferredReturnType occurrences="1">
<code>\Generator&lt;array&lt;string&gt;&gt;</code>
Expand Down
1 change: 0 additions & 1 deletion src/Vendor/Composer/ComposerJsonNormalizer.php
Expand Up @@ -33,7 +33,6 @@ public function __construct(string $schemaUri)
Pointer\Specification::never(),
),
new BinNormalizer(),
new ConfigHashNormalizer(),
new PackageHashNormalizer(),
new VersionConstraintNormalizer(),
);
Expand Down
118 changes: 0 additions & 118 deletions src/Vendor/Composer/ConfigHashNormalizer.php

This file was deleted.

2 changes: 0 additions & 2 deletions test/Unit/Vendor/Composer/ComposerJsonNormalizerTest.php
Expand Up @@ -27,7 +27,6 @@
* @uses \Ergebnis\Json\Normalizer\ChainNormalizer
* @uses \Ergebnis\Json\Normalizer\SchemaNormalizer
* @uses \Ergebnis\Json\Normalizer\Vendor\Composer\BinNormalizer
* @uses \Ergebnis\Json\Normalizer\Vendor\Composer\ConfigHashNormalizer
* @uses \Ergebnis\Json\Normalizer\Vendor\Composer\PackageHashNormalizer
* @uses \Ergebnis\Json\Normalizer\Vendor\Composer\VersionConstraintNormalizer
*/
Expand All @@ -44,7 +43,6 @@ public function testComposesNormalizers(): void
$normalizerClassNames = [
SchemaNormalizer::class,
Vendor\Composer\BinNormalizer::class,
Vendor\Composer\ConfigHashNormalizer::class,
Vendor\Composer\PackageHashNormalizer::class,
Vendor\Composer\VersionConstraintNormalizer::class,
];
Expand Down