maglnet/composer-require-checker
CLI tool that scans your PHP sources and composer.json to ensure every used class/function/extension comes from an explicit require. Detects “soft” (transitive) dependencies and missing PHP extensions so updates don’t break your package.
guzzlehttp/guzzle due to a major version bump in a direct dependency). Aligns with shift-left security and dependency governance initiatives.pdo_mysql) in composer.json via automated PRs.symfony/var-dumper as a soft dependency for debugging).thatvendor/api-lib example).composer validate or phpstan instead)."This tool acts like a 'dependency spellchecker' for PHP projects. Right now, our code might silently rely on libraries we didn’t explicitly install (e.g., guzzlehttp/guzzle pulled in by another package). If that library gets updated unexpectedly, our app could break. ComposerRequireChecker scans our code to flag these risks—preventing costly outages during dependency updates. It’s low-cost (MIT license), widely used (992 stars), and integrates seamlessly with our CI/CD. For a one-time setup, it saves us from future fire drills."
ROI:
*"This is a static analysis tool that catches 'soft dependencies'—libraries your code uses but aren’t listed in composer.json. Example: If thatvendor/api-lib pulls in guzzlehttp/guzzle (v2), but your code uses Guzzle v3 features, a major update could break you. The tool:
guzzlehttp/guzzle:^3.0 to composer.json').bin/console).How to Use:
- name: Check soft dependencies
run: php composer-require-checker.phar check composer.json
Trade-offs:
symfony/var-dumper).XDEBUG_MODE=off)."*Key Metrics to Track:
How can I help you explore Laravel packages today?