Skip to content

Commit 8cc903c

Browse files
authored
Update LaravelHttpClientLoggerServiceProvider.php
Explicitly mark parameter $logger as nullable The parameter has a default value of null, but isn't explicitly marked as nullable, which causes a warning in PHP 8.4
1 parent c8a70e2 commit 8cc903c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LaravelHttpClientLoggerServiceProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function packageBooted()
5959
}
6060
});
6161

62-
PendingRequest::macro('logWith', function (HttpLoggerInterface $logger = null): PendingRequest {
62+
PendingRequest::macro('logWith', function (?HttpLoggerInterface $logger = null): PendingRequest {
6363
/** @var \Illuminate\Http\Client\PendingRequest $this */
6464
return $this->withMiddleware((new LoggingMiddleware($logger, new LogAllFilter()))->__invoke());
6565
});

0 commit comments

Comments
 (0)