PHP code example of composer / metadata-minifier
1. Go to this page and download the library: Download composer/metadata-minifier 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/ */
composer / metadata-minifier example snippets
$packageName = 'monolog/monolog';
$url = 'https://repo.packagist.org/p2/' . $packageName . '~dev.json';
$json = json_decode(file_get_contents($url), true);
$versions = \Composer\MetadataMinifier\MetadataMinifier::expand($json['packages'][$packageName]);