salibhdr/php-dump-logger
A lightweight PHP debugging utility for dumping variables, arrays, and objects to log files instead of the page. It helps inspect application state cleanly, keep debug output out of responses, and simplify troubleshooting in Laravel and plain PHP projects.
composer require salibhdr/php-dump-logger. Because 3.0.0 bumps symfony/var-dumper to ^8, run composer why symfony/var-dumper immediately afterward to see whether Composer actually resolved v8 or whether your Laravel version pinned v7 and blocked the install.dump()/dd(), and output is appended to a log file rather than emitted to the HTTP response or console.dump() would corrupt a JSON response or disappear into a worker. Replace dump($payload) with the package helper and inspect the log with tail -f storage/logs/<dump-log> (or whatever path the README/config specifies).app()->isLocal() and whether you add the log file to .gitignore.dump() so responses remain valid. Log the variable, continue execution, and tail the file in a second terminal. This is the primary day-to-day use case.dump() is unreliable or invisible in workers; the log helper gives you a durable trail. Log before/after external calls and include an identifier (job ID, order ID) in the message so grep is useful.dd() with the “die” variant sparingly: useful in a one-off request, dangerous in queue jobs because it kills the worker process mid-job. Prefer non-fatal logging in async code.dump_log('checkout payload', $payload).debug_log() that no-ops unless app()->isLocal() or a dedicated env flag is set. This prevents stray dumps from shipping to production.setUp() or point it at a temp path; otherwise the file grows across CI runs and can leak fixture data.docker compose exec into the container to tail it. Do not assume the host path matches.^2.1 for older PHP, ^3.0 for 8.3+) rather than relying on floating constraints.symfony/var-dumper ^8 vs Laravel. Laravel 10/11/12 constrain symfony/var-dumper to the 7.x line. A hard ^8 requirement in 3.0.0 will conflict with the framework’s own dependency and can make composer require fail or force an unwanted framework upgrade. Check composer why symfony/var-dumper before adopting 3.0.0; if it conflicts, stay on 2.1.1 until Laravel allows v8.symfony/var-dumper:^8 while claiming PHP 8.3 support may not actually resolve on 8.3. Verify with composer update --dry-run on your exact PHP version rather than trusting the release note.> dump.log truncation is fine locally but not in production.composer dump-autoload and confirm the package’s files autoload entry is present. If the package registers a global VarDumper handler, remember it affects all dump() calls, including framework internals.How can I help you explore Laravel packages today?