Skip to content

Commit

Permalink
Fix deprecated factory definition
Browse files Browse the repository at this point in the history
  • Loading branch information
soullivaneuh authored and GuilhemN committed Dec 8, 2015
1 parent 6628774 commit 212e276
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion DependencyInjection/Compiler/PointcutMatchingPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 212e276

Please sign in to comment.