- What is patchwork/dumper used for?
- patchwork/dumper is a lightweight PHP variable inspection tool. It renders readable output for scalars, arrays, and objects, handles recursion and references, and works in CLI or HTML contexts. In Laravel, similar output is already available through symfony/var-dumper, dump(), and dd().
- Does patchwork/dumper work with Laravel?
- Not natively. patchwork/dumper is framework-agnostic and does not ship a Laravel service provider or config surface. Composer may install it, but its global helper functions can overlap with Laravel's dump() and dd(), risking fatal Cannot redeclare errors. Use it only with guards or a fork, and treat that as maintained internal code.
- How do I install patchwork/dumper?
- Install it as a development dependency with composer require --dev patchwork/dumper. Verify the exact package name, version, and commit SHA before installing, because the linked repository and package name do not match. There is no Laravel auto-discovery or configuration to publish.
- Is patchwork/dumper compatible with PHP 8?
- PHP 8 compatibility is unverified. The package is archived and targets older PHP and Symfony generations, while reflection-based dumping must handle typed properties, enums, readonly classes, and attributes. Test in an isolated project before relying on it.
- Why does patchwork/dumper conflict with Laravel dump and dd?
- Both expose global dump-style helpers. Loading patchwork/dumper alongside Laravel's foundation helpers can redeclare the same function names, causing an application-wide fatal error including CI. Avoiding this requires conditional function guards or a vendor fork.
- What are the best alternatives to patchwork/dumper for Laravel?
- Laravel already includes symfony/var-dumper for dump() and dd(), php artisan dump-server for CLI dumps, and ecosystem tools such as Telescope, Ignition, Clockwork, Ray, and Xdebug. These cover readable dumps and deep inspection without adding an archived dependency. Evaluate whether any concrete capability is missing before adopting patchwork/dumper.
- Is patchwork/dumper still maintained?
- No. The project is archived, with no bug fixes, PHP compatibility work, security advisories, or triage. It has low ecosystem scrutiny, so any pinned version is effectively unreviewed code you own. Apply an adoption gate for maintenance, supported PHP and Laravel versions, and a named internal owner.
- Can I use patchwork/dumper in production?
- It is a debugging utility and should not be a production dependency. Even in development, conflicts with Laravel helpers and unverified PHP 8 behavior create risk. Keep it out of runtime requirements and avoid deploying it to production environments.
- How do I limit nesting depth and string length in patchwork/dumper?
- patchwork/dumper provides configurable limits for nesting depth and string length through its API. There is no Laravel config file or container binding, so you set options directly in code. Confirm the exact API against the installed version because documentation may be stale.
- Is patchwork/dumper the same package as tchwork/debug-bundle?
- They appear to be different artifacts. patchwork/dumper is described as a framework-agnostic variable dumper, while tchwork/debug-bundle is a Symfony DebugBundle backport. The shared metadata makes identity verification essential; confirm the Composer package name, version, and commit SHA before any decision.