whatisgithub

What is collision?

nunomaduro/collision — explained in plain English

Analysis updated 2026-06-26

4,649PHPAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

A PHP package that replaces raw CLI error dumps with a readable, highlighted display showing the relevant line and context, making debugging from the terminal much faster.

Mindmap

mindmap
  root((collision))
    What it does
      CLI error display
      Code highlighting
    Integrations
      Laravel
      Symfony
      PHPUnit
    Setup
      Composer install
      Dev dependency
    Audience
      PHP developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Replace the default PHP CLI error output with a readable highlighted display in your Laravel or Symfony project

USE CASE 2

Add readable error formatting to PHPUnit test output to spot failures faster

USE CASE 3

Install as a dev dependency to improve debugging without affecting production behavior

USE CASE 4

Use in a custom PHP CLI script to show friendly errors to the developer running it

What is it built with?

PHPComposerLaravelSymfonyPHPUnit

How does it compare?

nunomaduro/collisionkimai/kimaisymfony/filesystem
Stars4,6494,6464,646
LanguagePHPPHPPHP
Setup difficultyeasymoderateeasy
Complexity2/53/52/5
Audiencedeveloperpm founderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
Free to use for any purpose, including commercial projects, with no restrictions beyond keeping the copyright notice.

So what is it?

Collision is a PHP package that improves the way errors are displayed when running applications from the command line. By default, when a PHP application crashes in the terminal, the error output can be hard to read: a wall of text with stack traces that require effort to parse. Collision replaces that with a cleaner, more readable error display that highlights the relevant line of code and shows context around the problem. The package is built on top of an existing PHP error handler called Whoops, and it focuses specifically on the command-line experience rather than browser-based error pages. It is compatible with several major PHP frameworks including Laravel, Symfony, and PHPUnit. Laravel includes it by default, which is one reason it has accumulated a large number of users. Installation is done through Composer, which is the standard PHP package manager. You add it as a development dependency, meaning it is only active during development and not in production. If you are using it outside of a supported framework, you register the handler manually with a single line of code. The README includes a version compatibility table showing which version of Collision works with which version of Laravel and the PHPUnit testing framework. The current version requires PHP 8.2 or later. Collision is maintained by Nuno Maduro, a prominent figure in the PHP and Laravel community. The project is open-source under the MIT license.

Copy-paste prompts

Prompt 1
How do I install Collision in a Laravel project and verify it is working by triggering an intentional exception in the CLI?
Prompt 2
Show me how to manually register the Collision error handler in a plain PHP CLI script that does not use Laravel.
Prompt 3
How do I configure Collision to show extra context lines around the error location in the terminal output?
Prompt 4
I am using Collision with PHPUnit, show me how to get the prettiest test failure output in my Laravel project.
Prompt 5
How do I check which version of Collision is compatible with my current Laravel and PHPUnit versions?

Frequently asked questions

What is collision?

A PHP package that replaces raw CLI error dumps with a readable, highlighted display showing the relevant line and context, making debugging from the terminal much faster.

What language is collision written in?

Mainly PHP. The stack also includes PHP, Composer, Laravel.

What license does collision use?

Free to use for any purpose, including commercial projects, with no restrictions beyond keeping the copyright notice.

How hard is collision to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is collision for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.