imponeer/extension-info-contracts

Interfaces that helps to describe extension

v0.5.0 2025-07-12 18:18 UTC

README

License GitHub release PHP Packagist

Extensions Info Contracts

A contract library that standardizes how extension information is retrieved across different installation methods.

Many extensions (especially for CMS platforms) can be installed through multiple methods—via Composer or by manually copying files to specific directories. This diversity creates challenges when trying to gather consistent information about installed extensions. This library provides standardized contracts to solve that problem, making it easier to create unified extension information readers regardless of the installation method.

Installation

We recommend installing this package via Composer:

composer require imponeer/extension-info-contracts

Alternatively, you can manually include the files from the src/ directory.

Usage

The following libraries implement these contracts:

Development

The following Composer commands are available for development:

Check code style:

composer phpcs

Runs PHP_CodeSniffer to check code style according to defined standards.

Fix code style issues:

composer phpcbf

Automatically fixes code style issues using PHP_CodeSniffer.

Static analysis:

composer phpstan

Runs PHPStan for static code analysis using the configuration in phpstan.neon.

API Documentation

Autogenerated API documentation is available in the project wiki.

Contributing

Contributions are welcome! To add functionality or fix bugs:

  1. Fork the repository
  2. Make your changes
  3. Create a pull request

For bug reports or questions, please use the issues tab.