Download the PHP package selfphp/php-dependency-inspector without Composer
On this page you can find all versions of the php package selfphp/php-dependency-inspector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download selfphp/php-dependency-inspector
More information about selfphp/php-dependency-inspector
Files in selfphp/php-dependency-inspector
Package php-dependency-inspector
Short Description CLI tool for analyzing, cleaning up, and monitoring Composer dependencies in PHP projects.
License MIT
Informations about the package php-dependency-inspector
PHP Dependency Inspector
CLI tool for analyzing, cleaning up, and monitoring Composer dependencies in PHP projects.
๐ Commands
๐ analyse
Option | Description |
---|---|
--path=... |
Path to project root (default: current dir) |
--only-unused |
Show only packages that are not used in the codebase |
--output=... |
Export results to a Markdown file |
๐ก audit (for CI / Cron)
Option | Description |
---|---|
--path=... |
Project directory to analyze |
--output=... |
Write Markdown report to file |
--output-json=... |
Write JSON report to file |
--threshold=... |
Allow up to N unused packages before failing |
--exit-on-unused |
Return exit code 1 if unused packages exceed threshold |
--exit-on-outdated |
Set to none , minor , or major to fail (exit code 2 ) on outdated deps |
--max-outdated=... |
Max number of outdated packages before failing with code 2 |
--fail-if-total-packages-exceeds=... |
Fail with exit code 3 if total package count exceeds limit |
--no-ansi |
Disable ANSI colors (for CI log compatibility) |
Exit Codes
0
: All checks passed1
: Too many unused packages2
: Outdated packages violate threshold3
: Total package count exceeds limit
โ Example
โน๏ธ Analysis Logic
As of v1.4.0
, the tool only analyzes production dependencies listed under require
in composer.json
.
Development packages from require-dev
are excluded from usage checks.
This ensures accurate reports for production readiness and avoids false positives from test-related packages like phpunit/phpunit
.
๐งช Testing
Runs PHPUnit tests for core functionality.
๐ฆ Installation
Make sure you have a valid composer.lock
file in your project root.
๐ CI Integration
GitHub Actions
.github/workflows/dependency-audit.yml
GitLab CI
.gitlab-ci.yml
All versions of php-dependency-inspector with dependencies
nikic/php-parser Version ^5.4
symfony/process Version ^7.3
selfphp/console Version ^1.0