Skip to content

Commit 702d093

Browse files
Merge branch '6.4' into 7.0
* 6.4: [OptionsResolver] Improve invalid type message on nested option cs fix Update KernelTestCase.php [DoctrineBridge] Silence ORM deprecation add missing default-doctrine-dbal-provider cache pool attribute to XSD
2 parents f36e094 + 146b2c9 commit 702d093

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed

Resources/config/schema/symfony-1.0.xsd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@
337337
<xsd:element name="default-psr6-provider" type="xsd:string" minOccurs="0" maxOccurs="1" />
338338
<xsd:element name="default-redis-provider" type="xsd:string" minOccurs="0" maxOccurs="1" />
339339
<xsd:element name="default-memcached-provider" type="xsd:string" minOccurs="0" maxOccurs="1" />
340+
<xsd:element name="default-doctrine-dbal-provider" type="xsd:string" minOccurs="0" maxOccurs="1" />
340341
<xsd:element name="default-pdo-provider" type="xsd:string" minOccurs="0" maxOccurs="1" />
341342
<xsd:element name="pool" type="cache_pool" minOccurs="0" maxOccurs="unbounded" />
342343
</xsd:sequence>

Test/KernelTestCase.php

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -104,25 +104,8 @@ protected static function createKernel(array $options = []): KernelInterface
104104
{
105105
static::$class ??= static::getKernelClass();
106106

107-
if (isset($options['environment'])) {
108-
$env = $options['environment'];
109-
} elseif (isset($_ENV['APP_ENV'])) {
110-
$env = $_ENV['APP_ENV'];
111-
} elseif (isset($_SERVER['APP_ENV'])) {
112-
$env = $_SERVER['APP_ENV'];
113-
} else {
114-
$env = 'test';
115-
}
116-
117-
if (isset($options['debug'])) {
118-
$debug = $options['debug'];
119-
} elseif (isset($_ENV['APP_DEBUG'])) {
120-
$debug = $_ENV['APP_DEBUG'];
121-
} elseif (isset($_SERVER['APP_DEBUG'])) {
122-
$debug = $_SERVER['APP_DEBUG'];
123-
} else {
124-
$debug = true;
125-
}
107+
$env = $options['environment'] ?? $_ENV['APP_ENV'] ?? $_SERVER['APP_ENV'] ?? 'test';
108+
$debug = $options['debug'] ?? $_ENV['APP_DEBUG'] ?? $_SERVER['APP_DEBUG'] ?? true;
126109

127110
return new static::$class($env, $debug);
128111
}

0 commit comments

Comments
 (0)