PHPackages                             composer/metadata-minifier - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. composer/metadata-minifier

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

composer/metadata-minifier
==========================

Small utility library that handles metadata minification and expansion.

1.0.1(3d ago)181123.3M↓30.4%411MITPHPPHP ^5.3.2 || ^7.0 || ^8.0CI passing

Since Apr 7Pushed 3d ago2 watchersCompare

[ Source](https://github.com/composer/metadata-minifier)[ Packagist](https://packagist.org/packages/composer/metadata-minifier)[ Fund](https://packagist.com)[ GitHub Sponsors](https://github.com/composer)[ RSS](/packages/composer-metadata-minifier/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (2)Dependencies (6)Versions (4)Used By (11)

composer/metadata-minifier
==========================

[](#composermetadata-minifier)

Small utility library that handles metadata minification and expansion.

This is used by [Composer](https://github.com/composer/composer)'s 2.x repository metadata protocol.

Installation
------------

[](#installation)

Install the latest version with:

```
composer require composer/metadata-minifier
```

Requirements
------------

[](#requirements)

- PHP 5.3.2 is required but using the latest version of PHP is highly recommended.

Basic usage
-----------

[](#basic-usage)

### `Composer\MetadataMinifier\MetadataMinifier`

[](#composermetadataminifiermetadataminifier)

- `MetadataMinifier::expand()`: Expands an array of minified versions back to their original format
- `MetadataMinifier::minify()`: Minifies an array of versions into a set of version diffs

For 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]);
```

License
-------

[](#license)

composer/metadata-minifier is licensed under the MIT License, see the LICENSE file for details.

###  Health Score

67

—

FairBetter than 99% of packages

Maintenance99

Actively maintained with recent releases

Popularity68

Solid adoption and visibility

Community26

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 72% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1909 days

Total

2

Last Release

3d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/183678?v=4)[Jordi Boggiano](/maintainers/Seldaek)[@Seldaek](https://github.com/Seldaek)

---

Top Contributors

[![Seldaek](https://avatars.githubusercontent.com/u/183678?v=4)](https://github.com/Seldaek "Seldaek (18 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![Chris8934](https://avatars.githubusercontent.com/u/44963939?v=4)](https://github.com/Chris8934 "Chris8934 (1 commits)")[![tacman](https://avatars.githubusercontent.com/u/619585?v=4)](https://github.com/tacman "tacman (1 commits)")

---

Tags

composercompression

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/composer-metadata-minifier/health.svg)

```
[![Health](https://phpackages.com/badges/composer-metadata-minifier/health.svg)](https://phpackages.com/packages/composer-metadata-minifier)
```

###  Alternatives

[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k315.9M84](/packages/jean85-pretty-package-versions)[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k41.4M2.8k](/packages/ergebnis-composer-normalize)[icanhazstring/composer-unused

Show unused packages by scanning your code

1.7k7.9M224](/packages/icanhazstring-composer-unused)[bamarni/composer-bin-plugin

No conflicts for your bin dependencies

53024.4M1.1k](/packages/bamarni-composer-bin-plugin)[alchemy/zippy

Zippy, the archive manager companion

47723.4M53](/packages/alchemy-zippy)[shipmonk/composer-dependency-analyser

Fast detection of composer dependency issues (dead dependencies, shadow dependencies, misplaced dependencies)

6198.4M667](/packages/shipmonk-composer-dependency-analyser)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
