Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Php Var Dump Check

Php Var Dump Check Laravel Package

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.

View on GitHub
Deep Wiki
Context7

PHP VarDump Check is a PHP console tool that scans your codebase for forgotten debug output such as var_dump, print_r, and var_export, helping keep commits clean. It can also detect dump helpers from popular ecosystems (Tracy, Symfony, Laravel, Doctrine, Zend, Ladybug) and reports the exact file/line with a code snippet.

Note: this repository is abandoned; consider https://github.com/php-parallel-lint/PHP-Var-Dump-Check.

  • Detects multiple dump APIs via flags (e.g. --symfony, --laravel, --tracy)
  • Clear CLI report with offending call, file path, and line number
  • Supports exclude paths and custom file extensions
  • Optional colored output (with jakub-onderka/php-console-highlighter)
Frequently asked questions about Php Var Dump Check
Does PHP VarDump Check work with Laravel 10.x and PHP 8.2+?
No, this package is abandoned and lacks PHP 8.x or Laravel 10.x support. The original repo hasn’t been updated since 2018, so you’ll need to fork and modernize it or use an alternative like PHPStan with custom rules. Test thoroughly if you attempt to adapt it.
How do I install PHP VarDump Check for Laravel projects?
Add it as a dev dependency via Composer: `composer require-dev jakub-onderka/php-var-dump-check:^0.3`. For Laravel-specific checks, use the `--laravel` flag. Install `jakub-onderka/php-console-highlighter` separately for colored output.
Can I exclude specific directories (e.g., tests, staging) from scans?
Yes, use the `--exclude` flag to skip directories. For example, `--exclude vendor --exclude tests` ignores those folders. This helps avoid false positives in non-production code.
Will this tool detect Laravel’s `dd()` and `dump()` functions?
Yes, the `--laravel` flag explicitly checks for `dd()` and `dump()` calls. It also supports Blade templates if you include `.blade.php` extensions via `--extensions`. Test in a non-critical branch first to confirm coverage.
How can I integrate this into Laravel’s CI/CD pipeline?
Add it to your GitHub Actions or GitLab CI as a pre-merge check. Example: `run: ./vendor/bin/var-dump-check --laravel --exclude vendor .`. Set it to fail builds if dumps are found, or use `--no-colors` for cleaner logs.
Are there false positives with intentional debug calls (e.g., feature flags)?
Yes, it may flag legitimate debug calls in staging or feature branches. Mitigate this by excluding those directories or using `--exclude` to target only production-relevant paths. Review output carefully before enforcing strict checks.
What alternatives exist for Laravel debug dump detection?
Consider PHPStan with the [`phpstan/extension-installer`](https://github.com/phpstan/extension-installer) and custom rules, or Psalm. These modern tools offer IDE integration, broader static analysis, and active maintenance. The abandoned fork at `php-parallel-lint/PHP-Var-Dump-Check` is another option.
Does this tool support Blade templates (e.g., `@dump`)?
No, it only scans PHP files by default. To include Blade templates, manually specify `.blade.php` extensions with `--extensions php,blade.php`. Note this may produce false positives in dynamic Blade code.
How do I handle dependencies like `jakub-onderka/php-parallel-lint`?
The tool relies on abandoned dependencies, which could introduce instability. Test thoroughly in a staging environment. For long-term use, fork the repo and update dependencies to modern versions compatible with PHP 8.x.
Can I use this in a Laravel monorepo with multiple apps?
Yes, but configure `--exclude` to target only the relevant app directories. Run it separately for each app or use a script to aggregate results. Example: `./vendor/bin/var-dump-check --laravel --exclude vendor ./app/Backend ./app/Frontend`.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport