Skip to content

Commit c33c65a

Browse files
Merge branch '3.4' into 4.3
* 3.4: Fix inconsistent return points. Fix remaining tests
2 parents 386746c + 8cc59b4 commit c33c65a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Compiler/AutowirePass.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,8 @@ private function getAutowiredReference(TypedReference $reference)
309309
if ($this->container->has($type) && !$this->container->findDefinition($type)->isAbstract()) {
310310
return new TypedReference($type, $type, $reference->getInvalidBehavior());
311311
}
312+
313+
return null;
312314
}
313315

314316
/**
@@ -441,7 +443,7 @@ private function createTypeAlternatives(ContainerBuilder $container, TypedRefere
441443
} elseif (isset($this->types[$type])) {
442444
$message = sprintf('the existing "%s" service', $this->types[$type]);
443445
} else {
444-
return;
446+
return '';
445447
}
446448

447449
return sprintf(' You should maybe alias this %s to %s.', class_exists($type, false) ? 'class' : 'interface', $message);
@@ -470,5 +472,7 @@ private function getAliasesSuggestionForType(ContainerBuilder $container, $type,
470472
if ($aliases) {
471473
return sprintf('Try changing the type-hint%s to "%s" instead.', $extraContext, $aliases[0]);
472474
}
475+
476+
return null;
473477
}
474478
}

Loader/XmlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ private function parseDefinition(\DOMElement $service, $file, array $defaults)
230230
$alias->setDeprecated(true, $deprecated[0]->nodeValue ?: null);
231231
}
232232

233-
return;
233+
return null;
234234
}
235235

236236
if ($this->isLoadingInstanceof) {

0 commit comments

Comments
 (0)