From 7e8fc787aa1e1c68c6eb2456e5533288c20cccf6 Mon Sep 17 00:00:00 2001 From: Michiel Vugteveen Date: Mon, 23 Dec 2024 14:30:59 +0100 Subject: [PATCH] fix php 8.4 Deprecated warnings --- src/BootHelpers.php | 4 ++-- src/Http/Middleware/MiddlewareDeclaration.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BootHelpers.php b/src/BootHelpers.php index 52537eb..d94a077 100644 --- a/src/BootHelpers.php +++ b/src/BootHelpers.php @@ -32,7 +32,7 @@ trait BootHelpers * @param callable|string|null $callback * @return void */ - protected function withDriver(string $service, string|array $driver, callable|string $callback = null): void + protected function withDriver(string $service, string|array $driver, callable|string|null $callback = null): void { if (is_string($driver)) { $driver = [$driver => $callback]; @@ -57,7 +57,7 @@ protected function withDriver(string $service, string|array $driver, callable|st protected function withValidationRule( string $rule, callable|string $callback, - callable|string $message = null, + callable|string|null $message = null, bool $implicit = false ): void { $this->callAfterResolving( diff --git a/src/Http/Middleware/MiddlewareDeclaration.php b/src/Http/Middleware/MiddlewareDeclaration.php index 8d489e4..497b397 100644 --- a/src/Http/Middleware/MiddlewareDeclaration.php +++ b/src/Http/Middleware/MiddlewareDeclaration.php @@ -89,7 +89,7 @@ public function last(): void * @param (callable(\Illuminate\Contracts\Foundation\Application):TValue)|null $callback * @return $this */ - public function shared(callable $callback = null): static + public function shared(?callable $callback = null): static { $this->kernel->getApplication()->singleton($this->middleware, $callback);