Collision Is An Error Handler Framework for Console Applications

Collision Is An Error Handler Framework for Console Applications

Collision is a new package by Nuno Maduro that provides error handling for command line applications. It’s built on top of the Whoops package and provides adapters for both the Laravel artisan console and PHPUnit.

Once installed, this package will automatically work with Laravel through Laravel 5.5 package auto-discovery. Here’s an example of what Collision might look like with artisan:

Collision supports PHPUnit by adding the following to your project’s phpunit.xml configuration:

<listeners>
    <listener class="NunoMaduro\Collision\Adapters\Phpunit\Listener" />
</listeners>

You can also use Collision as a stand-alone error handler for CLI tools. You just need to register the error handler in your code manually:

(new \NunoMaduro\Collision\Provider)->register();

Check out the official repo for more information on Collision and learn how to start using it with Laravel artisan, PHPUnit, and PHP CLI projects.


Filed in: Laravel Packages


Newsletter

Join the weekly newsletter and never miss out on new tips, tutorials, and more.

Laravel News Partners

Laravel Jobs

Senior PHP/Laravel Developer: Your Dream Work Environment
Remote
iPhone Photography School
In-house Laravel Developer.
Gold Coast / Australia
MXstore
Laravel Developer
Oak Brook, IL
Tidal Commerce
Senior Backend Engineer
Santa Monica only
Saatchi Art
Senior Laravel Developer
San Francisco
Stitch Labs
Senior Software Developer
South Jordan, UT
Lendio
Full-Stack Developer
Paris, France
Wingly