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 Laravel Package

php-parallel-lint/php-var-dump-check

CI-friendly tool that scans your PHP code for leftover debugging statements like var_dump(), print_r(), die()/dd() and similar. Helps keep accidental dumps out of production by failing builds when debug output is found.

View on GitHub
Deep Wiki
Context7

Getting Started

This package is a simple static analysis tool to scan PHP source code for forgotten var_dump(), print_r(), dd(), die(var_dump(...)), and similar debugging calls that should not be present in production code. Start by installing it via Composer:

composer require --dev php-parallel-lint/php-var-dump-check

Then run it from the CLI:

./vendor/bin/var-dump-check src

It outputs paths and line numbers where debugging dumps were found. Ideal for CI pipelines to prevent debug artifacts from reaching production.

Implementation Patterns

  • CI Integration: Add as a pre-commit hook or CI step (e.g., in .github/workflows/ci.yml) to fail builds if dumps are detected.
  • Custom Rules: Extend via CLI flags (e.g., --filter "*.php", --exclude build/) or config file (var-dump-check.json) to ignore specific directories or file patterns (e.g., test fixtures).
  • IDE Hooks: Integrate into Composer scripts ("lint:var-dump": "var-dump-check app") for quick local checks.
  • Complement Tools: Pair with tools like PHPStan or PHP-CS-Fixer for layered code hygiene — this targets debugging leaks specifically.

Gotchas and Tips

  • Staleness: Last released in 2020 — verify compatibility with newer PHP versions (tested up to 8.0 at release). Prefer composer update over pinned versions unless pinned for stability.
  • False Positives: May flag internal uses (e.g., test assertions) — use --exclude or config to whitelist test directories.
  • Exit Codes: Returns 1 if dumps found (non-zero = failure), 0 otherwise — suitable for CI logic.
  • Limited Scope: Only checks for common debug dumping functions; won’t catch logging or custom debug helpers. Consider adding regex overrides via --extended or custom checks.
  • No config fallback by default: Create var-dump-check.json in project root to define defaults (e.g., { "paths": ["src"], "exclude": ["tests"] }).
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