cpsit / auditor
Audit PHP application bundles.
Installs: 31 721
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 7
Forks: 0
Open Issues: 0
Type:composer-plugin
Requires
- php: ^8.2 || ^8.3
- composer-plugin-api: ^2.1
Requires (Dev)
- composer/composer: ^2.1
- phpunit/phpunit: ^10.5 || ^11.0
- symfony/filesystem: >=6.4
This package is auto-updated.
Last update: 2025-05-26 21:12:51 UTC
README
Auditor
This is a Composer plugin. It allows to access information about the current (root) package.
Requirements
- Composer 2.1+
- PHP ^8.2 || ^8.3
Version matrix
PHP 8.3 | PHP 8.2 | PHP 8.1 | PHP 8.0 | PHP 7.4 | |
---|---|---|---|---|---|
Composer 2.x | >=0.7 | >=0.7 | <=0.6.x | <=0.6.x | <=0.6.x |
Note: Version 0.7+ requires PHP 8.2+ and uses modern PHP features including strict types, typed properties, and PHPUnit 10/11.
Usage
In your project root
composer require cpsit/auditor
After installation or update via Composer a class CPSIT\Auditor\BundleDescriber
is generated.
It allows to access each property of your bundle (root package).
Examples
Get the name of the current root package:
$name = \CPSIT\Auditor\BundleDescriber::getProperty('name');
Get the repositories used by composer for the installation:
$repositories = \CPSIT\Auditor\BundleDescriber::getProperty('repositories');
Get the installed packages (omit not installed package):
$packages = \CPSIT\Auditor\Reflection\PackageVersions::getAll();
Returns an array of CPSIT\Auditor\Dto\Package
objects.