PHPackages                             designcise/manifest-json - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. designcise/manifest-json

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

designcise/manifest-json
========================

manifest.json parser/loader for PHP

v3.1.0(2y ago)52.5k↓40.9%1MITPHPPHP &gt;=8.0CI failing

Since May 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/designcise/manifest-json)[ Packagist](https://packagist.org/packages/designcise/manifest-json)[ RSS](/packages/designcise-manifest-json/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (9)Used By (0)

Designcise\\ManifestJson
========================

[](#designcisemanifestjson)

[![CI](https://github.com/designcise/manifest-json/actions/workflows/ci.yml/badge.svg)](https://github.com/designcise/manifest-json/actions/workflows/ci.yml)[![Maintainability](https://camo.githubusercontent.com/72a88d977675eb67aa1b8577b7e9b4c147eb25a9f9668cadfe8c9afbd8906fbe/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f30656462383937663637336562333638666237332f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/designcise/manifest-json/maintainability)[![Test Coverage](https://camo.githubusercontent.com/af2c9de0e342af5b7c77e6f24205a932eb578e074085d9875773131959427d1a/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f30656462383937663637336562333638666237332f746573745f636f766572616765)](https://codeclimate.com/github/designcise/manifest-json/test_coverage)

PHP `manifest.json` parser/loader.

Installing
----------

[](#installing)

```
composer require designcise/manifest-json
```

Note

Requires PHP 8.0 or later.

Example
-------

[](#example)

```
use Designcise\ManifestJson\ManifestJson;

$manifest = new ManifestJson('path/to/manifest/'); // defaults to `manifest.json`
// or $manifest = new ManifestJson('path/to/manifest/my-manifest.json');

$entry = $manifest->get('entry.js');
$metadata = $manifest->getAll();
$css = $manifest->getAllByType('css');
$images = $manifest->getAllByTypes(['jpg', 'png']);
$js = $manifest->getAllByKey('*.js');
$criticalJs = $manifest->getAllByKeyBasename('critical-*.js');
```

API
---

[](#api)

### `static from(string $dirOrFile): self`

[](#static-fromstring-dirorfile-self)

Static method to load `manifest.json` file from specified directory. If only directory is specified then it is assumed that file name is `manifest.json` by default, otherwise the specified name is used. For example:

```
ManifestJson::from('path/to/manifest/'); // defaults to `manifest.json`
ManifestJson::from('path/to/manifest/my-manifest.json');
```

### `get(string $key): string`

[](#getstring-key-string)

Gets the `manifest.json` metadata for the specified `$key`.

### `getAll(): array`

[](#getall-array)

Get all entries in the `manifest.json` file as an array.

### `getAllByType(string $type): array`

[](#getallbytypestring-type-array)

Gets all files with the specified file extension (for e.g. `css`, `js`, etc.) as an array.

### `getAllByTypes(array $types): array`

[](#getallbytypesarray-types-array)

Gets all files with the specified file extensions (e.g. `['css', 'js']`, etc.) as an array.

### `getAllByKey(string $key): array`

[](#getallbykeystring-key-array)

Gets all files that match the specified key. It looks for a full match in the manifest entries' key. It can optionally have wildcard using asterisk (e.g. `*.js`, `*index*`, etc.).

### `getAllByKeyBasename(string $key): array`

[](#getallbykeybasenamestring-key-array)

Gets all files that match the trailing name component of path in the manifest entry's key. It can optionally have wildcard using asterisk (e.g. `*.js`, `index*`, etc.).

Tests
-----

[](#tests)

To run the tests you can use the following commands:

CommandType`composer test`PHPUnit tests`composer style`CodeSniffer`composer style-fix`CodeSniffer Fixer`composer md`MessDetector`composer check`PHPStanContributing
------------

[](#contributing)

- File issues at
- Issue patches to

License
-------

[](#license)

Please see [License File](LICENSE.md) for licensing information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 98% 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 ~225 days

Recently: every ~331 days

Total

7

Last Release

849d ago

Major Versions

v1.2.0 → v2.0.02021-07-22

v2.0.1 → v3.0.02024-01-21

PHP version history (3 changes)1.0.0PHP &gt;=7.4.0

v2.0.0PHP &gt;=8.0

v3.0.0PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/c8da96262286c45c3cbc9fb5e0cc6e3195ae967d8f3c2f58bbeaccf103ca4b16?d=identicon)[designcise](/maintainers/designcise)

---

Top Contributors

[![designcise](https://avatars.githubusercontent.com/u/6676615?v=4)](https://github.com/designcise "designcise (50 commits)")[![fiskhandlarn](https://avatars.githubusercontent.com/u/680264?v=4)](https://github.com/fiskhandlarn "fiskhandlarn (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/designcise-manifest-json/health.svg)

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

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[meyfa/php-svg

Read, edit, write, and render SVG files with PHP

54613.9M42](/packages/meyfa-php-svg)

PHPackages © 2026

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