jakub-onderka/php-var-dump-check
Abandoned CLI tool that scans PHP projects for leftover debug dumps (var_dump, print_r, var_export, plus Tracy/Ladybug/Symfony/Laravel/Doctrine/Zend helpers). Supports excludes, extension filtering, and optional colored output via console highlighter.
Pros:
var_dump, dd, or framework-specific debugging calls left in production code.dd()/dump() functions, reducing false negatives in Laravel projects.Cons:
dd()/dump() (tested in v0.3), but untested against newer Laravel versions (e.g., 10.x).dd() aliases or monolithic debugging functions.main/production branches.- name: Check for forgotten debug dumps
run: vendor/bin/var-dump-check --laravel --exclude vendor .
jakub-onderka/php-parallel-lint (also abandoned), which could introduce instability.dd() in Illuminate\Support\Facades).@dump).phpstan/extension-installer or roave/security-advisories for broader checks.--exclude to ignore test/staging directories.main (strict) or just log warnings (lenient)?phpstan/phpstan (with custom rules) or psalm be a better long-term fit?dd()/dump() in PHP files, Blade templates (if configured), and service providers.eval() or dynamic Blade includes).composer require-dev jakub-onderka/php-var-dump-check:^0.3)../vendor/bin/var-dump-check --laravel --exclude vendor ./app
main:
- name: VarDump Check
run: composer require-dev jakub-onderka/php-var-dump-check && ./vendor/bin/var-dump-check --laravel --exclude vendor .
package.json scripts (if using Laravel Mix/Vite):
"scripts": {
"debug-check": "php vendor/bin/var-dump-check --laravel --exclude vendor ./app"
}
npm run debug-check or alias in .bashrc.dd()/dump() from Illuminate\Support\Facades\Debug and Symfony\Component\VarDumper\VarDumper.dd() aliases (e.g., app('debug')->dd())..blade.php). Workaround:
php artisan view:clear + scan compiled views in storage/framework/views).@dump directives.match expressions, attributes).VAR_DUMP_CHECK_EXCLUDES.md file for team-wide rules../vendor/bin/var-dump-check).--exclude tests).--exclude storage --exclude tests).php-parallel-lint support).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Tool breaks with PHP 8.x | CI pipeline fails | Fork and patch for PHP 8.x support |
| False positives block PRs | Developer frustration | Whitelist directories/feature flags |
| Blade templates not scanned | Debug calls in views missed | Scan compiled views or add regex checks |
| Abandoned dependency issues | php-parallel-lint breaks |
Pin versions or replace with symfony/finder |
How can I help you explore Laravel packages today?