fix: option to supress vendor deprecation

This commit is contained in:
2026-03-25 07:39:08 +01:00
parent d1eeac6692
commit 80f48f4aba
8 changed files with 134 additions and 1 deletions

View File

@@ -36,7 +36,7 @@ final class EnvValidator
}
$env = [];
foreach (array_merge(self::REQUIRED_KEYS, ['APP_URL', 'APP_CRYPTO_KEY']) as $key) {
foreach (array_merge(self::REQUIRED_KEYS, ['APP_URL', 'APP_CRYPTO_KEY', 'APP_VENDOR_PHP_ISSUES_MODE']) as $key) {
$env[$key] = getenv($key);
}
@@ -97,6 +97,14 @@ final class EnvValidator
$errors[] = "TENANT_SCOPE_STRICT must be a boolean value (true/false/1/0)";
}
$vendorPhpIssuesMode = strtolower(self::value($env, 'APP_VENDOR_PHP_ISSUES_MODE'));
if (
$vendorPhpIssuesMode !== ''
&& !in_array($vendorPhpIssuesMode, ['strict', 'suppress_deprecations', 'suppress_deprecations_warnings'], true)
) {
$errors[] = 'APP_VENDOR_PHP_ISSUES_MODE must be one of: strict, suppress_deprecations, suppress_deprecations_warnings';
}
$reverseProxy = self::value($env, 'FIREWALL_REVERSE_PROXY');
if ($reverseProxy !== '' && self::parseBool($reverseProxy) === null) {
$errors[] = "FIREWALL_REVERSE_PROXY must be a boolean value (true/false/1/0)";