search hotlink icon profile hotlink icon

Internally, the metadata representing and describing the package consists of a monolithic data structure with sequential and associative entries. This page explains the schema of the primitive part of these entries.

On This Page

ID

The id entry contains the identifier of the package. It typically consists of an optional group name, a forward slash separator, and the required package name, formatted like this:

                $metadata["id"] = "valvoid/fusion";
            

However, the example above is only a subset of the following criteria:

  • The optional namespace prefix can include up to 4 group names.
  • Segments are separated by a forward slash.
  • Must pass the regex ^[a-z_][a-z0-9_]{0,20}(\/[a-z_][a-z0-9_]{0,20}){0,4}$.
  • Each segment:
    • Starts with lowercase alphabetic character or underscore.
    • May consists of lowercase alphabetic characters, underscore or digits.
    • Is between 1 and 20 characters long.

Name

The name entry contains the name of the package. A short, descriptive label for the package, such as:

                $metadata["name"] = "Fusion";
            

Description

The description entry contains a detailed explanation of the package. A summary of the package's purpose and functionality, such as:

                $metadata["description"] = "A package manager for PHP-based projects.";
            

Version

The version entry contains the semantic version of the package. It typically includes only the required "major", "minor", and "patch" components, formatted as follows:

                $metadata["version"] = "1.0.0";
            

In accordance with the Semantic Versioning Specification 2.0.0, the value can also include the optional "release" and "build" parts, such as:

  • 1.0.0+54321
  • 1.0.0-beta+12345