Skip to content

Commit 0b51b38

Browse files
authored
Feature/updgrade to latest versions (#3)
* Upgrade dependencies
1 parent 712df34 commit 0b51b38

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Add `Softonic\Laravel\Middleware\RequestId::class` in `App\Http\Kernel`.
1616
For all routes:
1717
```php
1818
protected $middleware = [
19-
Softonic\Laravel\Middleware\RequestId::class,
19+
\Softonic\Laravel\Middleware\RequestId::class,
2020
....
2121
]
2222
```
@@ -26,7 +26,7 @@ Specific group:
2626
// Example for WEB group
2727
protected $middlewareGroups = [
2828
'web' => [
29-
Softonic\Laravel\Middleware\RequestId::class,
29+
\Softonic\Laravel\Middleware\RequestId::class,
3030
...
3131
],
3232

@@ -49,4 +49,9 @@ Register the middleware as a route middleware in `App\Http\Kernel`.
4949
then, use it in your routes file, for example in `routes\web.php`
5050
```php
5151
Route::get('route', function() {})->middleware('request-id');
52-
```
52+
```
53+
54+
### Extra
55+
56+
If you need to have the X-Request-Id ASAP, you can modify `\App\Providers\AppServiceProvider::boot` adding `$_SERVER['HTTP_X_REQUEST_ID'] ??= \Ramsey\Uuid\Uuid::uuid4()->toString();`.
57+
This is going to allow you to use the X-Request-ID in the framework booting to for example customize monolog or in console executions.

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
"license": "Apache-2.0",
1616
"type": "library",
1717
"require": {
18-
"php": ">=7.0",
19-
"illuminate/http": "^5.3",
20-
"ramsey/uuid": "^3.5"
18+
"php": ">=7.4",
19+
"illuminate/http": ">7.0",
20+
"ramsey/uuid": "^4.0.0"
2121
},
2222
"require-dev": {
23-
"phpunit/phpunit": "^6.0"
23+
"phpunit/phpunit": "^9.0"
2424
},
2525
"autoload": {
2626
"psr-4": {

0 commit comments

Comments
 (0)