0011: Dumps through a prepend file

On this page

Status: accepted. Where the Laravel manifest lives is superseded by 0033: it's in the project's bootstrap/cache now.

Context

Capturing dump() and Laravel's queries, jobs and views must work for every PHP version without building a C extension, and without changing projects.

Decision

An auto_prepend_file defines dump/dd and posts to a loopback collector. For Laravel it points APP_PACKAGES_CACHE at a manifest that adds Short Leash's service provider.

Consequences

Works on every PHP version Short Leash ships. Can be turned off per feature. Projects' files are never changed (except the cache file 0033 adds).