Skip to content

Commit

Permalink
Enhancement: Remove dependency on ergebnis/composer-json-normalizer
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Jan 9, 2020
1 parent 4a1f7ff commit 6ee6c8a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 75 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"require": {
"php": "^7.1",
"composer-plugin-api": "^1.1.0",
"ergebnis/composer-json-normalizer": "^2.0.1",
"ergebnis/json-normalizer": "~0.10.1",
"ergebnis/json-normalizer": "~0.11.0",
"ergebnis/json-printer": "^3.0.2",
"localheinz/diff": "^1.0.1"
},
Expand Down
86 changes: 16 additions & 70 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion phar/composer-normalize.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

$command = new Normalize\Command\NormalizeCommand(
new Factory(),
new Json\Normalizer\ComposerJsonNormalizer(__DIR__ . '/../resource/schema.json'),
new Normalizer\Vendor\Composer\ComposerJsonNormalizer(__DIR__ . '/../resource/schema.json'),
new Normalizer\Format\Formatter(new Printer\Printer()),
new Diff\Differ(new Diff\Output\StrictUnifiedDiffOutputBuilder([
'fromFile' => 'original',
Expand Down
3 changes: 1 addition & 2 deletions src/NormalizePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Composer\Factory;
use Composer\IO;
use Composer\Plugin;
use Ergebnis\Composer\Json\Normalizer\ComposerJsonNormalizer;
use Ergebnis\Json\Normalizer;
use Ergebnis\Json\Printer;
use Localheinz\Diff;
Expand All @@ -40,7 +39,7 @@ public function getCommands(): array
return [
new Command\NormalizeCommand(
new Factory(),
new ComposerJsonNormalizer(\sprintf(
new Normalizer\Vendor\Composer\ComposerJsonNormalizer(\sprintf(
'file://%s',
__DIR__ . '/../resource/schema.json'
)),
Expand Down

0 comments on commit 6ee6c8a

Please sign in to comment.