From 65b7f9410ef0400921b37eddb3095019c6510b1b Mon Sep 17 00:00:00 2001 From: 4n70w4 <38257723+4n70w4@users.noreply.github.com> Date: Thu, 14 Feb 2019 17:36:46 +0300 Subject: [PATCH] #49 correct order for addMethodCall() --- DependencyInjection/Compiler/PointcutMatchingPass.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/DependencyInjection/Compiler/PointcutMatchingPass.php b/DependencyInjection/Compiler/PointcutMatchingPass.php index 635c82a..6419647 100644 --- a/DependencyInjection/Compiler/PointcutMatchingPass.php +++ b/DependencyInjection/Compiler/PointcutMatchingPass.php @@ -186,9 +186,12 @@ private function processDefinition(Definition $definition, $pointcuts, &$interce $enhancer->writeClass($proxyFilename); $definition->setFile($proxyFilename); $definition->setClass($enhancer->getClassName($class)); - $definition->addMethodCall('__CGInterception__setLoader', array( + + $tinterceptor_loader = array(array('__CGInterception__setLoader', array( new Reference('jms_aop.interceptor_loader') - )); + ))); + + $definition->setMethodCalls(array_merge($tinterceptor_loader, $definition->getMethodCalls() ) ); } private function relativizePath($targetPath, $path)