From 55ceb3a7ad7c229e197f397035a7139069962a67 Mon Sep 17 00:00:00 2001 From: Matt Stauffer Date: Mon, 15 May 2023 12:26:47 -0400 Subject: [PATCH] Load specific drivers before custom drivers to allow for extension. Co-Authored-By: Chris Brown --- cli/Valet/Drivers/ValetDriver.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cli/Valet/Drivers/ValetDriver.php b/cli/Valet/Drivers/ValetDriver.php index f9eb5d7ea..7ce24987c 100644 --- a/cli/Valet/Drivers/ValetDriver.php +++ b/cli/Valet/Drivers/ValetDriver.php @@ -33,6 +33,9 @@ public static function assign(string $sitePath, string $siteName, string $uri): { $drivers = []; + // Must scan these so they're extensible by customSiteDrivers loaded next + $specificDrivers = static::specificDrivers(); + // Queue custom driver based on path if ($customSiteDriver = static::customSiteDriver($sitePath)) { $drivers[] = $customSiteDriver; @@ -43,7 +46,7 @@ public static function assign(string $sitePath, string $siteName, string $uri): // Queue Valet-shipped drivers $drivers[] = 'LaravelValetDriver'; - $drivers = array_merge($drivers, static::specificDrivers()); + $drivers = array_merge($drivers, $specificDrivers); $drivers[] = 'BasicWithPublicValetDriver'; $drivers[] = 'BasicValetDriver';