Skip to content

Commit 8620e1c

Browse files
Merge branch '5.0' into 5.1
* 5.0: [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 663f5dd + 60bce23 commit 8620e1c

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
@@ -206,7 +206,7 @@ public function setDefault(string $option, $value)
206206
return $this;
207207
}
208208

209-
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()))) {
209+
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()))) {
210210
// Store closure for later evaluation
211211
$this->nested[$option][] = $value;
212212
$this->defaults[$option] = [];
@@ -1283,7 +1283,7 @@ private function formatOptions(array $options): string
12831283

12841284
private function getParameterClassName(\ReflectionParameter $parameter): ?string
12851285
{
1286-
if (!($type = $parameter->getType()) || $type->isBuiltin()) {
1286+
if (!($type = $parameter->getType()) instanceof \ReflectionNamedType || $type->isBuiltin()) {
12871287
return null;
12881288
}
12891289

0 commit comments

Comments
 (0)