Skip to content

Commit 9065dca

Browse files
committed
[DependencyInjection] Fix return of YamlFileLoader::parseDefaults
1 parent 2c7d442 commit 9065dca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Loader/YamlFileLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,15 @@ private function parseDefinitions($content, $file)
175175
private function parseDefaults(array &$content, $file)
176176
{
177177
if (!isset($content['services']['_defaults'])) {
178-
return $content;
178+
return array();
179179
}
180180
if (!is_array($defaults = $content['services']['_defaults'])) {
181181
throw new InvalidArgumentException(sprintf('Service defaults must be an array, "%s" given in "%s".', gettype($defaults), $file));
182182
}
183183
if (isset($defaults['alias']) || isset($defaults['class']) || isset($defaults['factory'])) {
184184
@trigger_error('Giving a service the "_defaults" name is deprecated since Symfony 3.3 and will be forbidden in 4.0. Rename your service.', E_USER_DEPRECATED);
185185

186-
return $content;
186+
return array();
187187
}
188188

189189
$defaultKeys = array('public', 'tags', 'inherit_tags', 'autowire');

0 commit comments

Comments
 (0)