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.
← nunomaduro on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.