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

Laravel + Vue.JS developer
Remote or in Toronto Canada
Star Dot Hosting Inc
Full Stack or Back-End Developer
Alexandria, VA; Tallahassee, FL; Orlando, FL
Marketing for Change
Senior Quality Assurance Engineer
Remote
Bisnow Media
Senior PHP/Laravel Developer: Your Dream Work Environment
Remote
iPhone Photography School
Senior Software Engineer
Remote or San Francisco
Curology
Laravel Developer
Las Vegas, NV
V Shred
R&D Developer
Denver, CO
booj