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

Mid / Sen. Software Engineer
Clearwater, FL
ShineOn
Full Stack or Back-End Developer
Alexandria, VA; Tallahassee, FL; Orlando, FL
Marketing for Change
Full Stack Software Engineer
Atlanta, GA or Remote
Voxie
Laravel/PHP Developer
Chicago, IL
Neon One
Software Engineer, Web Applications
Vaughan, ON, Canada
Blast Motion
Contract Services Software Engineer (Laravel | Vue | Tailwind)
Remote
Riverbed Technology
Senior Laravel Developer
Wilmington, NC
GE Software Inc.