imponeer / extension-info-contracts
Interfaces that helps to describe extension
Requires
- php: >=8.3
- ext-fileinfo: *
- composer/composer: ^2.8.0
- dragonmantank/cron-expression: ^3.1
- league/flysystem: ^2.0 || ^3.0
Requires (Dev)
- phpstan/phpstan: ^2.0
- squizlabs/php_codesniffer: ^3.13
Suggests
- composer/composer: For using with composer based factories
- dragonmantank/cron-expression: For using to describe extensions that can have cron jobs
README
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:
- ImpressCMS/extensions-formats - Extension reader for ImpressCMS themes and modules
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:
- Fork the repository
- Make your changes
- Create a pull request
For bug reports or questions, please use the issues tab.