From 8481d08b978241849fd1a993a941182c5c559400 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Sat, 16 Jan 2021 15:44:01 +0100 Subject: [PATCH] Make sure mocked service is not lazy (#14) This will fix #13 --- .../CompilerPass/ProxyServiceWithMockPass.php | 1 + 1 file changed, 1 insertion(+) 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); } } }