fix: option to supress vendor deprecation
This commit is contained in:
@@ -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)";
|
||||
|
||||
Reference in New Issue
Block a user