Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

manifest

> 编程语言
Open source

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

7.5K stars0 likes0 views
WebsiteGitHub

About

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

Manifest

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

Installation

You can add this library as a local, per-project dependency to your project using Composer:

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

Read from manifest.xml

php
use PharIo\Manifest\ManifestLoader;
use PharIo\Manifest\ManifestSerializer;

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

var_dump($manifest);

echo (new ManifestSerializer)->serializeToString($manifest);
Output
…

Create via API

…
Output
xml
<?xml version="1.0" encoding="UTF-8"?>
<phar xmlns="https://phar.io/xml/manifest/1.0">
    <contains name="vendor/package" version="1.0.0" type="library"/>
    <copyright>
        <license type="BSD-3-Clause" url="https://spdx.org/licenses/BSD-3-Clause.html"/>
    </copyright>
    <requires>
        <php version="*"/>
    </requires>
    <bundles>
        <component name="vendor/packageA" version="1.2.3-dev"/>
    </bundles>
</phar>

Issues· 5 open

View all issuesOpen on GitHub
  • #33

    New Feature: a `PharIo\Manifest\ManifestValidator` will be greatly appreciated

    enhancementUpdated Jun 10, 2025
  • #32

    v2.0.x does not support multiple licenses definition

    bugenhancementUpdated Mar 11, 2024
  • #12

    Feature: Add ability to read .github/FUNDING.yml

    enhancementUpdated Dec 1, 2020

> Tags

PHP

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 2, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言