Merge branch 'main' into php-85

# Conflicts:
#	src/SPC/builder/linux/LinuxBuilder.php
#	src/SPC/store/source/PhpSource.php
#	src/globals/test-extensions.php
This commit is contained in:
crazywhalecc
2025-07-31 23:46:34 +08:00
88 changed files with 1129 additions and 678 deletions

View File

@@ -16,6 +16,8 @@ class GlobalEnvManager
{
private static array $env_cache = [];
private static bool $initialized = false;
public static function getInitializedEnv(): array
{
return self::$env_cache;
@@ -29,6 +31,9 @@ class GlobalEnvManager
*/
public static function init(): void
{
if (self::$initialized) {
return;
}
// Check pre-defined env vars exists
if (getenv('BUILD_ROOT_PATH') === false) {
throw new RuntimeException('You must include src/globals/internal-env.php before using GlobalEnvManager');
@@ -86,6 +91,7 @@ class GlobalEnvManager
self::putenv("{$k}={$v}");
}
}
self::$initialized = true;
}
public static function putenv(string $val): void