Ensure proper env vars are promoted for dev and test envs

This commit is contained in:
Alejandro Celaya
2024-10-24 14:20:45 +02:00
parent 4520afb271
commit 2a734b5d89
5 changed files with 20 additions and 16 deletions

View File

@@ -15,8 +15,11 @@ chdir(dirname(__DIR__));
require 'vendor/autoload.php';
// Promote env vars from installer or dev config
loadEnvVarsFromConfig('config/params/*.php', enumValues(EnvVars::class));
// Promote env vars from installer, dev config or test config
loadEnvVarsFromConfig(
EnvVars::isTestEnv() ? 'config/test/shlink_test_env.php' : 'config/params/*.php',
enumValues(EnvVars::class),
);
// This is one of the first files loaded. Configure the timezone and memory limit here
ini_set('memory_limit', EnvVars::MEMORY_LIMIT->loadFromEnv());