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

@@ -113,6 +113,27 @@ final class EnvValidatorTest extends TestCase
$this->assertContains('APP_URL must not use localhost or an IP host in production', $errors);
}
public function testValidateArrayAcceptsSupportedVendorPhpIssuesMode(): void
{
$errors = EnvValidator::validateArray($this->baseEnv([
'APP_VENDOR_PHP_ISSUES_MODE' => 'suppress_deprecations',
]));
$this->assertSame([], $errors);
}
public function testValidateArrayRejectsUnsupportedVendorPhpIssuesMode(): void
{
$errors = EnvValidator::validateArray($this->baseEnv([
'APP_VENDOR_PHP_ISSUES_MODE' => 'disable_everything',
]));
$this->assertContains(
'APP_VENDOR_PHP_ISSUES_MODE must be one of: strict, suppress_deprecations, suppress_deprecations_warnings',
$errors
);
}
/**
* @param array<string, string> $override
* @return array<string, string>
@@ -125,6 +146,7 @@ final class EnvValidatorTest extends TestCase
'APP_NAME' => 'CoreCore',
'APP_ENV' => 'dev',
'APP_DEBUG' => 'true',
'APP_VENDOR_PHP_ISSUES_MODE' => 'strict',
'APP_TIMEZONE' => 'Europe/Berlin',
'APP_STORAGE_PATH' => $storagePath,
'APP_LOCALE' => 'de',