Unverified Commit 29397a9f authored by Alex Pott's avatar Alex Pott
Browse files

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
parent 066f155b
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -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);
    }

+0 −1
Original line number Diff line number Diff line
@@ -117,7 +117,6 @@ autosave
autosubmit
autowire
autowired
autowiring
backend's
backlink
backlinks