From da94ce06e4032186ff693f699953038ee43c488d Mon Sep 17 00:00:00 2001 From: Kyle Filz Date: Wed, 5 Feb 2025 12:33:45 -0600 Subject: [PATCH] Allow precognition dispatchers to be bound by name for overriding --- .../Foundation/Http/Middleware/HandlePrecognitiveRequests.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Foundation/Http/Middleware/HandlePrecognitiveRequests.php b/src/Illuminate/Foundation/Http/Middleware/HandlePrecognitiveRequests.php index 32819c45a663..187275bf1e3a 100644 --- a/src/Illuminate/Foundation/Http/Middleware/HandlePrecognitiveRequests.php +++ b/src/Illuminate/Foundation/Http/Middleware/HandlePrecognitiveRequests.php @@ -60,8 +60,8 @@ protected function prepareForPrecognition($request) { $request->attributes->set('precognitive', true); - $this->container->bind(CallableDispatcherContract::class, fn ($app) => new PrecognitionCallableDispatcher($app)); - $this->container->bind(ControllerDispatcherContract::class, fn ($app) => new PrecognitionControllerDispatcher($app)); + $this->container->bind(CallableDispatcherContract::class, PrecognitionCallableDispatcher::class); + $this->container->bind(ControllerDispatcherContract::class, PrecognitionControllerDispatcher::class); } /**