Skip to content

Commit c556f26

Browse files
committed
Support for Magento Commerce (Cloud) applications that rely on DOCUMENT_ROOT
1 parent 9560909 commit c556f26

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cli/drivers/Magento2ValetDriver.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,10 @@ public function frontControllerPath($sitePath, $siteName, $uri)
144144
$this->checkMageMode($sitePath);
145145

146146
if ('developer' === $this->mageMode) {
147+
$_SERVER['DOCUMENT_ROOT'] = $sitePath;
147148
return $sitePath . '/index.php';
148149
}
150+
$_SERVER['DOCUMENT_ROOT'] = $sitePath . '/pub';
149151
return $sitePath . '/pub/index.php';
150152
}
151153
}

0 commit comments

Comments
 (0)