PHPackages                             phar-io/manifest - 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. phar-io/manifest

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

phar-io/manifest
================

Component for reading phar.io manifest information from a PHP Archive (PHAR)

2.0.4(2y ago)7.5k801.8M↓26.4%15[3 issues](https://github.com/phar-io/manifest/issues)[2 PRs](https://github.com/phar-io/manifest/pulls)20BSD-3-ClausePHPPHP ^7.2 || ^8.0CI failing

Since Mar 5Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/phar-io/manifest)[ Packagist](https://packagist.org/packages/phar-io/manifest)[ GitHub Sponsors](https://github.com/theseer)[ RSS](/packages/phar-io-manifest/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (6)Dependencies (1)Versions (11)Used By (20)

Manifest
========

[](#manifest)

Component for reading [phar.io](https://phar.io/) manifest information from a [PHP Archive (PHAR)](http://php.net/phar).

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

[](#installation)

You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):

```
composer require phar-io/manifest

```

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

```
composer require --dev phar-io/manifest

```

Usage Examples
--------------

[](#usage-examples)

### Read from `manifest.xml`

[](#read-from-manifestxml)

```
use PharIo\Manifest\ManifestLoader;
use PharIo\Manifest\ManifestSerializer;

$manifest = ManifestLoader::fromFile('manifest.xml');

var_dump($manifest);

echo (new ManifestSerializer)->serializeToString($manifest);
```

 Output```
object(PharIo\Manifest\Manifest)#14 (6) {
  ["name":"PharIo\Manifest\Manifest":private]=>
  object(PharIo\Manifest\ApplicationName)#10 (1) {
    ["name":"PharIo\Manifest\ApplicationName":private]=>
    string(12) "some/library"
  }
  ["version":"PharIo\Manifest\Manifest":private]=>
  object(PharIo\Version\Version)#12 (5) {
    ["originalVersionString":"PharIo\Version\Version":private]=>
    string(5) "1.0.0"
    ["major":"PharIo\Version\Version":private]=>
    object(PharIo\Version\VersionNumber)#13 (1) {
      ["value":"PharIo\Version\VersionNumber":private]=>
      int(1)
    }
    ["minor":"PharIo\Version\Version":private]=>
    object(PharIo\Version\VersionNumber)#23 (1) {
      ["value":"PharIo\Version\VersionNumber":private]=>
      int(0)
    }
    ["patch":"PharIo\Version\Version":private]=>
    object(PharIo\Version\VersionNumber)#22 (1) {
      ["value":"PharIo\Version\VersionNumber":private]=>
      int(0)
    }
    ["preReleaseSuffix":"PharIo\Version\Version":private]=>
    NULL
  }
  ["type":"PharIo\Manifest\Manifest":private]=>
  object(PharIo\Manifest\Library)#6 (0) {
  }
  ["copyrightInformation":"PharIo\Manifest\Manifest":private]=>
  object(PharIo\Manifest\CopyrightInformation)#19 (2) {
    ["authors":"PharIo\Manifest\CopyrightInformation":private]=>
    object(PharIo\Manifest\AuthorCollection)#9 (1) {
      ["authors":"PharIo\Manifest\AuthorCollection":private]=>
      array(1) {
        [0]=>
        object(PharIo\Manifest\Author)#15 (2) {
          ["name":"PharIo\Manifest\Author":private]=>
          string(13) "Reiner Zufall"
          ["email":"PharIo\Manifest\Author":private]=>
          object(PharIo\Manifest\Email)#16 (1) {
            ["email":"PharIo\Manifest\Email":private]=>
            string(16) "reiner@zufall.de"
          }
        }
      }
    }
    ["license":"PharIo\Manifest\CopyrightInformation":private]=>
    object(PharIo\Manifest\License)#11 (2) {
      ["name":"PharIo\Manifest\License":private]=>
      string(12) "BSD-3-Clause"
      ["url":"PharIo\Manifest\License":private]=>
      object(PharIo\Manifest\Url)#18 (1) {
        ["url":"PharIo\Manifest\Url":private]=>
        string(26) "https://domain.tld/LICENSE"
      }
    }
  }
  ["requirements":"PharIo\Manifest\Manifest":private]=>
  object(PharIo\Manifest\RequirementCollection)#17 (1) {
    ["requirements":"PharIo\Manifest\RequirementCollection":private]=>
    array(1) {
      [0]=>
      object(PharIo\Manifest\PhpVersionRequirement)#20 (1) {
        ["versionConstraint":"PharIo\Manifest\PhpVersionRequirement":private]=>
        object(PharIo\Version\SpecificMajorAndMinorVersionConstraint)#24 (3) {
          ["originalValue":"PharIo\Version\AbstractVersionConstraint":private]=>
          string(3) "7.0"
          ["major":"PharIo\Version\SpecificMajorAndMinorVersionConstraint":private]=>
          int(7)
          ["minor":"PharIo\Version\SpecificMajorAndMinorVersionConstraint":private]=>
          int(0)
        }
      }
    }
  }
  ["bundledComponents":"PharIo\Manifest\Manifest":private]=>
  object(PharIo\Manifest\BundledComponentCollection)#8 (1) {
    ["bundledComponents":"PharIo\Manifest\BundledComponentCollection":private]=>
    array(0) {
    }
  }
}

```

### Create via API

[](#create-via-api)

```
$bundled = new \PharIo\Manifest\BundledComponentCollection();
$bundled->add(
    new \PharIo\Manifest\BundledComponent('vendor/packageA', new \PharIo\Version\Version('1.2.3-dev')
    )
);

$manifest = new PharIo\Manifest\Manifest(
    new \PharIo\Manifest\ApplicationName('vendor/package'),
    new \PharIo\Version\Version('1.0.0'),
    new \PharIo\Manifest\Library(),
    new \PharIo\Manifest\CopyrightInformation(
        new \PharIo\Manifest\AuthorCollection(),
        new \PharIo\Manifest\License(
            'BSD-3-Clause',
            new \PharIo\Manifest\Url('https://spdx.org/licenses/BSD-3-Clause.html')
        )
    ),
    new \PharIo\Manifest\RequirementCollection(),
    $bundled
);

echo (new ManifestSerializer)->serializeToString($manifest);
```

 Output```

```

###  Health Score

66

—

FairBetter than 99% of packages

Maintenance56

Moderate activity, may be stable

Popularity83

Widely adopted with strong download metrics

Community35

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 72.2% 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 ~319 days

Recently: every ~348 days

Total

9

Last Release

897d ago

Major Versions

1.0.3 → 2.0.02020-05-09

PHP version history (3 changes)1.0.0PHP ^5.6 || ^7.0

2.0.0PHP ^7.2

2.0.1PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1089?v=4)[Sebastian Probst Eide](/maintainers/sebastian)[@sebastian](https://github.com/sebastian)

![](https://www.gravatar.com/avatar/0fc8fe1ac311fb26137cc3b26cd6c1bbb58c9ac4f287eb9d8242a741cef9a502?d=identicon)[theseer](/maintainers/theseer)

---

Top Contributors

[![theseer](https://avatars.githubusercontent.com/u/111333?v=4)](https://github.com/theseer "theseer (148 commits)")[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (36 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (11 commits)")[![Ayesh](https://avatars.githubusercontent.com/u/811553?v=4)](https://github.com/Ayesh "Ayesh (3 commits)")[![sebastianheuer](https://avatars.githubusercontent.com/u/169095?v=4)](https://github.com/sebastianheuer "sebastianheuer (2 commits)")[![mvorisek](https://avatars.githubusercontent.com/u/2228672?v=4)](https://github.com/mvorisek "mvorisek (1 commits)")[![PatrickRyan-](https://avatars.githubusercontent.com/u/6902183?v=4)](https://github.com/PatrickRyan- "PatrickRyan- (1 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (1 commits)")[![kylechallis](https://avatars.githubusercontent.com/u/2374759?v=4)](https://github.com/kylechallis "kylechallis (1 commits)")[![Chris53897](https://avatars.githubusercontent.com/u/7104259?v=4)](https://github.com/Chris53897 "Chris53897 (1 commits)")

### Embed Badge

![Health badge](/badges/phar-io-manifest/health.svg)

```
[![Health](https://phpackages.com/badges/phar-io-manifest/health.svg)](https://phpackages.com/packages/phar-io-manifest)
```

###  Alternatives

[phpunit/phpunit

The PHP Unit Testing framework.

20.0k971.0M166.3k](/packages/phpunit-phpunit)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5266.1M138](/packages/symplify-monorepo-builder)[phar-io/phive

The Phar Installation and Verification Environment.

62310.7k2](/packages/phar-io-phive)[claudiodekker/changelog-updater

A PHP package to programmatically update your changelog file.

1315.7k](/packages/claudiodekker-changelog-updater)

PHPackages © 2026

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