Skip to content

Commit 8d42411

Browse files
IndraGunawantaylorotwell
authored andcommitted
Add support to Symfony Flex directory structure (#475)
1 parent 4c243d7 commit 8d42411

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cli/drivers/SymfonyValetDriver.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class SymfonyValetDriver extends ValetDriver
1313
public function serves($sitePath, $siteName, $uri)
1414
{
1515
return (file_exists($sitePath.'/web/app_dev.php') || file_exists($sitePath.'/web/app.php')) &&
16-
(file_exists($sitePath.'/app/AppKernel.php')) || (file_exists($sitePath.'/web/index.php')) &&
16+
(file_exists($sitePath.'/app/AppKernel.php')) || (file_exists($sitePath.'/public/index.php')) &&
1717
(file_exists($sitePath.'/src/Kernel.php'))
1818
;
1919
}
@@ -30,6 +30,8 @@ public function isStaticFile($sitePath, $siteName, $uri)
3030
{
3131
if ($this->isActualFile($staticFilePath = $sitePath.'/web/'.$uri)) {
3232
return $staticFilePath;
33+
} elseif ($this->isActualFile($staticFilePath = $sitePath.'/public/'.$uri)) {
34+
return $staticFilePath;
3335
}
3436

3537
return false;
@@ -49,7 +51,7 @@ public function frontControllerPath($sitePath, $siteName, $uri)
4951
return $frontControllerPath;
5052
} elseif (file_exists($frontControllerPath = $sitePath.'/web/app.php')) {
5153
return $frontControllerPath;
52-
} elseif (file_exists($frontControllerPath = $sitePath.'/web/index.php')) {
54+
} elseif (file_exists($frontControllerPath = $sitePath.'/public/index.php')) {
5355
return $frontControllerPath;
5456
}
5557
}

0 commit comments

Comments
 (0)