composer/metadata-minifier
Utility library for Composer 2.x repository metadata. Minifies package version arrays into diffs and expands minified metadata back to the original structure, reducing JSON size and improving transfer efficiency. Includes simple static minify/expand APIs.
Small utility library that handles metadata minification and expansion.
This is used by Composer's 2.x repository metadata protocol.
Install the latest version with:
composer require composer/metadata-minifier
Composer\MetadataMinifier\MetadataMinifierMetadataMinifier::expand(): Expands an array of minified versions back to their original formatMetadataMinifier::minify(): Minifies an array of versions into a set of version diffsFor example to expand the dev versions (note the ~dev in the URL) of Monolog you would do:
$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]);
composer/metadata-minifier is licensed under the MIT License, see the LICENSE file for details.
How can I help you explore Laravel packages today?