From 212e276f5864be0058a9dfec3bbf384180293f1a Mon Sep 17 00:00:00 2001 From: Sullivan SENECHAL Date: Thu, 16 Apr 2015 10:55:32 +0200 Subject: [PATCH] Fix deprecated factory definition --- DependencyInjection/Compiler/PointcutMatchingPass.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/Compiler/PointcutMatchingPass.php b/DependencyInjection/Compiler/PointcutMatchingPass.php index eb42a37..635c82a 100644 --- a/DependencyInjection/Compiler/PointcutMatchingPass.php +++ b/DependencyInjection/Compiler/PointcutMatchingPass.php @@ -100,7 +100,12 @@ private function processDefinition(Definition $definition, $pointcuts, &$interce return; } - if ($definition->getFactoryService() || $definition->getFactoryClass()) { + // Symfony 2.6 getFactory method + // TODO: Use only getFactory when bumping require to Symfony >= 2.6 + if (method_exists($definition, 'getFactory') && $definition->getFactory()) { + return; + } + if (!method_exists($definition, 'getFactory') && ($definition->getFactoryService() || $definition->getFactoryClass())) { return; }