diff --git a/src/DependencyInjection/CompilerPass/ProxyServiceWithMockPass.php b/src/DependencyInjection/CompilerPass/ProxyServiceWithMockPass.php index 20870ba..affe88c 100644 --- a/src/DependencyInjection/CompilerPass/ProxyServiceWithMockPass.php +++ b/src/DependencyInjection/CompilerPass/ProxyServiceWithMockPass.php @@ -44,6 +44,7 @@ public function process(ContainerBuilder $container) $proxy = $factory->createProxy($definition->getClass(), $initializer); $definition->setClass(get_class($proxy)); $definition->setPublic(true); + $definition->setLazy(true); } } }