Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cac1c6a

Browse files
authored
[12.x] Allows APP_BASE_PATH from $_SERVER (#56868)
This would be useful in Github Actions environment where using `steps.*.env` would populate `$_SERVER` instead of `$_ENV`: ```yaml - name: Execute tests run: php vendor/bin/pest env: APP_BASE_PATH: ${{ github.workspace }}/vendor/laravel/vue-starter-kit ``` Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent 149a1d1 commit cac1c6a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Illuminate/Foundation/Application.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ public static function inferBasePath()
254254
{
255255
return match (true) {
256256
isset($_ENV['APP_BASE_PATH']) => $_ENV['APP_BASE_PATH'],
257+
isset($_SERVER['APP_BASE_PATH']) => $_SERVER['APP_BASE_PATH'],
257258
default => dirname(array_values(array_filter(
258259
array_keys(ClassLoader::getRegisteredLoaders()),
259260
fn ($path) => ! str_starts_with($path, 'phar://'),

0 commit comments

Comments
 (0)