nunomaduro/collision-adapter-symfony
Brings Collision's beautiful, readable error reporting to Symfony Console applications. This adapter integrates seamlessly so exceptions and stack traces render with syntax highlighting, clear file references, and helpful context right in your terminal.
nunomaduro/collision in directly — the adapter's incremental contribution is the framework metadata line plus consistent wiring.Adopt it when:
APP_DEBUG guard, with rollback being a Composer remove plus one deleted line.Look elsewhere when:
laravel/framework and the adapter is redundant. Stop here; this is the most common false positive.symfony/error-handler; mixing the two handlers causes double-rendering.Sequencing: POC on one low-blast-radius internal CLI with APP_DEBUG gating and confirm the framework metadata line actually appears — stock-looking Collision with no framework line means it is not wired in. Then test the awkward paths (-vvv, malformed exceptions, non-TTY/CI capture for ANSI garbage). Roll to remaining internal CLIs. Defer customer- or partner-facing CLI tooling until the adapter has survived at least one Symfony Console or Collision major-release cycle.
For executives: This is a low-cost, MIT-licensed developer-experience improvement that makes errors in our command-line tools easier to read and debug, shortening onboarding and troubleshooting time for engineers. Risk is contained: it is a thin adapter, not a platform commitment, and can be removed, vendored, or inlined at minimal cost. It supports internal-tooling and developer-productivity goals rather than customer-facing roadmap items. Be candid about the size of the win — it is an incremental ergonomics improvement for internal CLIs — and make explicit that a separate decision is still needed on production error tracking.
For engineering: Collision is the de facto pretty error handler for PHP consoles; this adapter wires it into Symfony Console so our CLIs get readable traces and the correct framework metadata line instead of the stock Symfony renderer. It is deliberately thin — Collision does the rendering, this package only makes Collision aware of Symfony — so frame the value accurately, or you will get a false negative. Integration is small and isolated: register Collision with the adapter at the console entrypoint before the kernel boots, keep it out of production error-handling paths, and pin both packages in composer.lock. Three runbook caveats: register Collision last so it overrides any earlier PHP exception handler (otherwise it can mask the original exception at the exact moment clear output matters most); gate it behind APP_DEBUG (or --no-ansi in CI) to avoid ANSI noise in logs; and verify three version axes — PHP minimum, Symfony Console major, and the transitive Collision major — against what CI actually resolves. Because adoption is low, plan to vendor or fork if upstream stalls; the adapter surface is small enough that a mid-level engineer can read and own it in a sitting. Pair it with a real error-tracking tool for production.
How can I help you explore Laravel packages today?