Skip to content

Commit c90dc5a

Browse files
committed
Merge branch '5.2' into 5.x
* 5.2: [Finder] Fix gitignore regex build with "**" Fixed deprecation warnings about passing null as parameter [Security] Keep Bulgarian wording consistent across all texts. Migrate configuration file for PHP CS Fixer 2.19/3.0 [Form] Replace broken ServerParams mock [Mailer] Fix SES API call with UTF-8 Addresses
2 parents 2b0cefe + 2761ca2 commit c90dc5a

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Compiler/CheckTypeDeclarationsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ private function checkType(Definition $checkedDefinition, $value, \ReflectionPar
205205
if ($value instanceof Definition) {
206206
$class = $value->getClass();
207207

208-
if (isset(self::BUILTIN_TYPES[strtolower($class)])) {
208+
if ($class && isset(self::BUILTIN_TYPES[strtolower($class)])) {
209209
$class = strtolower($class);
210210
} elseif (!$class || (!$this->autoload && !class_exists($class, false) && !interface_exists($class, false))) {
211211
return;

Compiler/RegisterServiceSubscribersPass.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,12 @@ protected function processValue($value, bool $isRoot = false)
9595
$serviceMap[$key] = new Reference($type);
9696
}
9797

98-
if (false !== $i = strpos($name, '::get')) {
99-
$name = lcfirst(substr($name, 5 + $i));
100-
} elseif (false !== strpos($name, '::')) {
101-
$name = null;
98+
if ($name) {
99+
if (false !== $i = strpos($name, '::get')) {
100+
$name = lcfirst(substr($name, 5 + $i));
101+
} elseif (false !== strpos($name, '::')) {
102+
$name = null;
103+
}
102104
}
103105

104106
if (null !== $name && !$this->container->has($name) && !$this->container->has($type.' $'.$name)) {

Compiler/ResolveBindingsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ protected function processValue($value, bool $isRoot = false)
180180
$typeHint = ProxyHelper::getTypeHint($reflectionMethod, $parameter);
181181
$name = Target::parseName($parameter);
182182

183-
if (\array_key_exists($k = ltrim($typeHint, '\\').' $'.$name, $bindings)) {
183+
if ($typeHint && \array_key_exists($k = ltrim($typeHint, '\\').' $'.$name, $bindings)) {
184184
$arguments[$key] = $this->getBindingValue($bindings[$k]);
185185

186186
continue;

0 commit comments

Comments
 (0)