refactor: support portable PHP hosting without Docker

This commit is contained in:
Marco0300
2026-09-01 19:22:48 +02:00
parent 9f5142b071
commit 5b2c64ff39
9 changed files with 128 additions and 159 deletions
+8
View File
@@ -4,6 +4,14 @@ declare(strict_types=1);
putenv('JOBcard_TEST_VALUE=present');
require_once __DIR__ . '/../config/bootstrap.php';
$tempEnv = tempnam(sys_get_temp_dir(), 'jobcard-env-');
file_put_contents($tempEnv, "JOBcard_LOADED=\"from-file\"\n# ignored\n");
load_dotenv($tempEnv);
unlink($tempEnv);
if (getenv('JOBcard_LOADED') !== 'from-file') {
throw new RuntimeException('Expected .env values to load from file');
}
$checks = 0;
assert(env_required('JOBcard_TEST_VALUE') === 'present');
$checks++;