Collision
Beautiful command-line error reporting for PHP apps and test suites
Repository Health
Technical Analysis
Collision is a PHP package that delivers beautiful, readable error reporting when you interact with your application through the command line. Built on top of the Whoops error handler, it renders exceptions with clear stack traces, highlighted code snippets, and helpful context, making CLI failures far easier to diagnose.
Widely known as the error reporter bundled with Laravel, Collision also supports Symfony, PHPUnit, Pest, Laravel Zero, and other frameworks. It installs as a dev dependency and hooks into console and test output, replacing cryptic default stack dumps with formatted, actionable reports.
What You Get
- Formatted, syntax-highlighted error output for command-line PHP applications
- Adapters for Laravel, Symfony, PHPUnit, Pest, and Laravel Zero
- Clear stack traces with the failing code excerpt inline
- Solution suggestions for recognized common errors
- A drop-in dev dependency that requires little to no configuration
Common Use Cases
- Getting readable error reports from artisan and other console commands
- Improving PHPUnit and Pest test failure output during development
- Diagnosing exceptions in CLI tools built with Symfony Console or Laravel Zero
Under The Hood
Architecture - The core lives in src/: a Handler implements the exception-handling contract, a Writer composes the terminal output, Highlighter renders syntax-highlighted source excerpts, ConsoleColor and ArgumentFormatter format details, and Coverage supports test coverage output. Framework integration is isolated under src/Adapters/ (Laravel, Phpunit) and wired through a Provider, while SolutionsRepositories supplies suggested fixes for recognized errors. Whoops provides the underlying exception inspection.
Tech Stack - PHP 8.2+ distributed via Composer, built on filp/whoops and Symfony Console components, with per-framework adapter dependencies pulled in as needed. Ships as a dev-time dependency.
Code Quality - Strong tooling: PHPUnit tests (phpunit.xml.dist), PHPStan at a high level with a baseline (phpstan.neon.dist), and active CI. The codebase is cleanly separated into contracts, adapters, and rendering concerns.
API Design - For most users there is no API to learn — installing the dev package auto-registers the handler in Laravel/Pest/PHPUnit and errors immediately look better. For custom CLI apps, wiring the Symfony adapter is a small, well-documented step, keeping the learning curve minimal.
Used by 18 apps in this directory
Akaunting
Invoicing Finance
Open-source online accounting for small businesses and freelancers — invoices, expenses, and reporting without monthly fees or vendor lock-in.
Bagisto
Analytics · Ecommerce
Open-source Laravel eCommerce platform for building multi-vendor marketplaces, B2B stores, headless commerce, and AI-powered storefronts.
Coolify
Devops · Hosting Control Panel
Open-source self-hosted PaaS — deploy apps, databases and 280+ services on your own servers with no vendor lock-in
Crater
Invoicing Finance
Open source invoicing and billing platform for freelancers and small businesses — create estimates, track expenses, accept Stripe payments, and run recurring invoices from your own server.
Databasement
Databases · Devops · Developer Tools
Self-hosted database backup manager with a web UI for scheduling, encrypting, and restoring MySQL, PostgreSQL, MongoDB, SQL Server, SQLite, Firebird, and Redis to S3, SFTP, Samba, or local storage.
Financial Freedom
Invoicing Finance
Own your financial data with a self-hosted, privacy-first budgeting app that replaces Mint and YNAB.
Fleetbase
Logistics
Modular open-source logistics and supply chain operating system
Hi.Events
Ecommerce · Scheduling
Self-hosted event ticketing platform that keeps your attendee data, brand, and revenue completely under your control.
Invoice Ninja
Invoicing Finance · Project Management
Self-hostable invoicing, time-tracking, and multi-gateway payment platform for freelancers and small businesses, with built-in e-invoicing compliance for EU and global standards.