PHP code example of ergebnis / composer-json-normalizer
1. Go to this page and download the library: Download ergebnis/composer-json-normalizer library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ergebnis / composer-json-normalizer example snippets
use Ergebnis\Composer\Json\Normalizer\ComposerJsonNormalizer;
use Ergebnis\Json\Normalizer\Json;
$normalizer = new ComposerJsonNormalizer('https://getcomposer.org/schema.json');
$json = Json::fromEncoded(file_get_contents(__DIR__ . '/composer.json'));
$normalized = $normalizer->normalize($json);
echo $normalized->encoded();