Unverified Commit 224ac3c0 authored by alexpott's avatar alexpott

Issue #3069026 by anmolgoyal74, Pooja Ganjage, mikelutz, longwave, alexpott,...

Issue #3069026 by anmolgoyal74, Pooja Ganjage, mikelutz, longwave, alexpott, xjm: Fix Call to deprecated method addAutowiringType() of class Symfony\Component\DependencyInjection\Definition in YamlFileLoader

(cherry picked from commit 29397a9f)
parent 4575b099
......@@ -292,24 +292,6 @@ private function parseDefinition($id, $service, $file)
$definition->setAutowired($service['autowire']);
}
if (isset($service['autowiring_types'])) {
if (is_string($service['autowiring_types'])) {
$definition->addAutowiringType($service['autowiring_types']);
} else {
if (!is_array($service['autowiring_types'])) {
throw new InvalidArgumentException(sprintf('Parameter "autowiring_types" must be a string or an array for service "%s" in %s. Check your YAML syntax.', $id, $file));
}
foreach ($service['autowiring_types'] as $autowiringType) {
if (!is_string($autowiringType)) {
throw new InvalidArgumentException(sprintf('A "autowiring_types" attribute must be of type string for service "%s" in %s. Check your YAML syntax.', $id, $file));
}
$definition->addAutowiringType($autowiringType);
}
}
}
$this->container->setDefinition($id, $definition);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment