From 5f2b26e19df6857cc718063c99dd72c70deba3a5 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 2 Jun 2017 00:03:58 +0200 Subject: [PATCH] [FrameworkBundle] Fix FC with 4.0 having autowiring types removed --- .../DependencyInjection/Compiler/CacheCollectorPass.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CacheCollectorPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CacheCollectorPass.php index 05e8a00a79..60cdadb49b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CacheCollectorPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/CacheCollectorPass.php @@ -50,7 +50,7 @@ class CacheCollectorPass implements CompilerPassInterface $definition->setTags(array()); $definition->setPublic(false); - if ($types = $definition->getAutowiringTypes(false)) { + if (method_exists($definition, 'getAutowiringTypes') && $types = $definition->getAutowiringTypes(false)) { $recorder->setAutowiringTypes($types); $definition->setAutowiringTypes(array()); }