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