From fd0669483249e84682ca3bb5fc02f69dc48111f0 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Wed, 20 Dec 2023 14:29:56 -0800 Subject: [PATCH] Make compatible with Valet version 4 --- WordPressProxyValetDriver.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/WordPressProxyValetDriver.php b/WordPressProxyValetDriver.php index d5454c5..58f9f54 100644 --- a/WordPressProxyValetDriver.php +++ b/WordPressProxyValetDriver.php @@ -1,5 +1,9 @@ configFile"); } @@ -88,7 +92,7 @@ public function isStaticFile($sitePath, $siteName, $uri) * @param string $siteName * @param string $uri */ - public function serveStaticFile($staticFilePath, $sitePath, $siteName, $uri) + public function serveStaticFile(string $staticFilePath, string $sitePath, string $siteName, string $uri): void { if ($this->shouldProxy($uri) && !file_exists($staticFilePath)) { $proxy = $this->getProxyUrl($sitePath); @@ -113,7 +117,7 @@ public function shouldProxy($uri) $dirName = pathinfo($uri, PATHINFO_DIRNAME); return in_array($extension, $this->proxyable) && - strpos($dirName, 'wp-content/uploads') !== false; + strpos($dirName, 'content/uploads') !== false; } /** @@ -128,4 +132,5 @@ protected function getProxyUrl($sitePath) return rtrim($proxy); } + }