| 148 |
lars |
1 |
<a href="https://supportukrainenow.org/"><img src="https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct.svg" width="100%"></a>
|
|
|
2 |
|
|
|
3 |
------
|
|
|
4 |
|
|
|
5 |
<p align="center">
|
|
|
6 |
<img src="https://raw.githubusercontent.com/nunomaduro/collision/stable/docs/logo.png" alt="Collision logo" width="480">
|
|
|
7 |
<br>
|
|
|
8 |
<img src="https://raw.githubusercontent.com/nunomaduro/collision/stable/docs/example.png" alt="Collision code example" height="300">
|
|
|
9 |
</p>
|
|
|
10 |
|
|
|
11 |
<p align="center">
|
|
|
12 |
<a href="https://github.com/nunomaduro/collision/actions"><img src="https://img.shields.io/github/workflow/status/nunomaduro/collision/Tests.svg" alt="Build Status"></img></a>
|
|
|
13 |
<a href="https://scrutinizer-ci.com/g/nunomaduro/collision"><img src="https://img.shields.io/scrutinizer/g/nunomaduro/collision.svg" alt="Quality Score"></img></a>
|
|
|
14 |
<a href="https://packagist.org/packages/nunomaduro/collision"><img src="https://poser.pugx.org/nunomaduro/collision/d/total.svg" alt="Total Downloads"></a>
|
|
|
15 |
<a href="https://packagist.org/packages/nunomaduro/collision"><img src="https://poser.pugx.org/nunomaduro/collision/v/stable.svg" alt="Latest Stable Version"></a>
|
|
|
16 |
<a href="https://packagist.org/packages/nunomaduro/collision"><img src="https://poser.pugx.org/nunomaduro/collision/license.svg" alt="License"></a>
|
|
|
17 |
</p>
|
|
|
18 |
|
|
|
19 |
---
|
|
|
20 |
|
|
|
21 |
Collision was created by, and is maintained by **[Nuno Maduro](https://github.com/nunomaduro)**, and is a package designed to give you beautiful error reporting when interacting with your app through the command line.
|
|
|
22 |
|
|
|
23 |
* It's included on **[Laravel](https://laravel.com)**, the most popular free, open-source PHP framework in the world.
|
|
|
24 |
* Built on top of the **[Whoops](https://github.com/filp/whoops)** error handler.
|
|
|
25 |
* Supports [Laravel](https://github.com/laravel/laravel), [Symfony](https://symfony.com), [PHPUnit](https://github.com/sebastianbergmann/phpunit), and many other frameworks.
|
|
|
26 |
|
|
|
27 |
## Installation & Usage
|
|
|
28 |
|
|
|
29 |
> **Requires [PHP 8.0+](https://php.net/releases/)**
|
|
|
30 |
|
|
|
31 |
Require Collision using [Composer](https://getcomposer.org):
|
|
|
32 |
|
|
|
33 |
```bash
|
|
|
34 |
composer require nunomaduro/collision --dev
|
|
|
35 |
```
|
|
|
36 |
|
|
|
37 |
## Laravel Version Compatibility
|
|
|
38 |
|
|
|
39 |
Laravel | Collision
|
|
|
40 |
:---------|:----------
|
|
|
41 |
6.x | 3.x
|
|
|
42 |
7.x | 4.x
|
|
|
43 |
8.x | 5.x
|
|
|
44 |
9.x | 6.x
|
|
|
45 |
|
|
|
46 |
As an example, here is how to require Collision on Laravel 6.x:
|
|
|
47 |
|
|
|
48 |
```bash
|
|
|
49 |
composer require nunomaduro/collision:^3.0 --dev
|
|
|
50 |
```
|
|
|
51 |
|
|
|
52 |
## Phpunit adapter
|
|
|
53 |
|
|
|
54 |
Phpunit must be 9.0 or higher.
|
|
|
55 |
|
|
|
56 |
Add the Collision `printerClass` to your `phpunit.xml` in the `phpunit` section:
|
|
|
57 |
|
|
|
58 |
```xml
|
|
|
59 |
<phpunit
|
|
|
60 |
printerClass="NunoMaduro\Collision\Adapters\Phpunit\Printer">
|
|
|
61 |
```
|
|
|
62 |
|
|
|
63 |
## No adapter
|
|
|
64 |
|
|
|
65 |
You need to register the handler in your code:
|
|
|
66 |
|
|
|
67 |
```php
|
|
|
68 |
(new \NunoMaduro\Collision\Provider)->register();
|
|
|
69 |
```
|
|
|
70 |
|
|
|
71 |
## Contributing
|
|
|
72 |
|
|
|
73 |
Thank you for considering to contribute to Collision. All the contribution guidelines are mentioned [here](CONTRIBUTING.md).
|
|
|
74 |
|
|
|
75 |
You can have a look at the [CHANGELOG](CHANGELOG.md) for constant updates & detailed information about the changes. You can also follow the twitter account for latest announcements or just come say hi!: [@enunomaduro](https://twitter.com/enunomaduro)
|
|
|
76 |
|
|
|
77 |
## License
|
|
|
78 |
|
|
|
79 |
Collision is an open-sourced software licensed under the [MIT license](LICENSE.md).
|
|
|
80 |
|
|
|
81 |
Logo by [Caneco](https://twitter.com/caneco).
|