Skip to content

Commit f32074d

Browse files
authored
Update README.md
Stress that Lumen is not officially supported and reference the Laravel docs on opting out of package auto discovery
1 parent 1d5aa0c commit f32074d

File tree

1 file changed

+4
-42
lines changed

1 file changed

+4
-42
lines changed

README.md

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -17,54 +17,16 @@ You can install the package via composer:
1717
```bash
1818
composer require bilfeldt/laravel-http-client-logger
1919
```
20-
Or install only in develop dependencies
21-
```bash
22-
composer require --dev bilfeldt/laravel-http-client-logger
23-
```
2420

2521
### Laravel
2622

27-
This package makes use of [Laravels package auto-discovery mechanism](https://medium.com/@taylorotwell/package-auto-discovery-in-laravel-5-5-ea9e3ab20518).
28-
29-
If for some reason you want manually control this:
30-
- add the package to the `extra.laravel.dont-discover` key in `composer.json`, e.g.
31-
```json
32-
"extra": {
33-
"laravel": {
34-
"dont-discover": [
35-
"bilfeldt/laravel-http-client-logger"
36-
]
37-
}
38-
}
39-
```
40-
- if don't use Laravel's package auto-discovery or you use dont-discover key
41-
- add the following class to the `providers` array in `config/app.php`:
42-
```php
43-
<?php
44-
// config/app.php
45-
return [
46-
// ...
47-
'providers' => [
48-
// ...
49-
Bilfeldt\LaravelHttpClientLogger\LaravelHttpClientLoggerServiceProvider::class
50-
]
51-
// ...
52-
];
53-
```
54-
- if you want to manually load it only in non-production environments, instead you can add this to your `AppServiceProvider` with the `register()` method:
55-
```php
56-
public function register()
57-
{
58-
if ($this->app->isLocal()) {
59-
$this->app->register(\Bilfeldt\LaravelHttpClientLogger\LaravelHttpClientLoggerServiceProvider::class);
60-
}
61-
// ...
62-
}
63-
```
23+
This package makes use of [Laravels package auto-discovery mechanism](https://medium.com/@taylorotwell/package-auto-discovery-in-laravel-5-5-ea9e3ab20518) so **there is no need to do any futher steps** - skip directly to the [usage](#usage) section below. If for some reason you wish to opt-out of package auto discovery, check [the Laravel Docs](https://laravel.com/docs/8.x/packages#opting-out-of-package-discovery) for more details.
6424

6525
### Lumen
6626

67-
If you use Lumen add the following service provider in `bootstrap/app.php`:
27+
NOTE: Lumen is **not** officially supported by this package. However, we are currently not aware of any incompatibilities.
28+
29+
If you use Lumen register the service provider in `bootstrap/app.php` like so:
6830

6931
```php
7032
<?php

0 commit comments

Comments
 (0)