Skip to content

Commit 60bce23

Browse files
Merge branch '4.4' into 5.0
* 4.4: [VarDumper] fix typo Fix support for PHP8 union types [FrameworkBundle] preserve dots in query-string when redirecting [3.4] Fix support for PHP8 union types [PhpUnitBridge] Streamline ansi/no-ansi of composer according to phpunit --colors option [3.4] Small update in our internal terminology [Cache] fix compat with DBAL v3 [HttpClient] Convert CurlHttpClient::handlePush() to instance method [VarDumper] Fix CliDumper coloration [DI] tighten detection of local dirs to prevent false positives [FrameworkBundle] preserve dots in query-string when redirecting Fix precendence in 4.4 bumped Symfony version to 3.4.43 updated VERSION for 3.4.42 update CONTRIBUTORS for 3.4.42 updated CHANGELOG for 3.4.42
2 parents 48f41cb + 2d8a3c8 commit 60bce23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

OptionsResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public function setDefault(string $option, $value)
201201
return $this;
202202
}
203203

204-
if (isset($params[0]) && null !== ($type = $params[0]->getType()) && self::class === $type->getName() && (!isset($params[1]) || (null !== ($type = $params[1]->getType()) && Options::class === $type->getName()))) {
204+
if (isset($params[0]) && null !== ($type = $params[0]->getType()) && self::class === $type->getName() && (!isset($params[1]) || (($type = $params[1]->getType()) instanceof \ReflectionNamedType && Options::class === $type->getName()))) {
205205
// Store closure for later evaluation
206206
$this->nested[$option][] = $value;
207207
$this->defaults[$option] = [];
@@ -1218,7 +1218,7 @@ private function formatOptions(array $options): string
12181218

12191219
private function getParameterClassName(\ReflectionParameter $parameter): ?string
12201220
{
1221-
if (!($type = $parameter->getType()) || $type->isBuiltin()) {
1221+
if (!($type = $parameter->getType()) instanceof \ReflectionNamedType || $type->isBuiltin()) {
12221222
return null;
12231223
}
12241224

0 commit comments

Comments
 (0)