Skip to content

Commit d8cfb8f

Browse files
author
github-ci
committed
refactor(symfony-aop-bundle): 修正Aop属性编译器中的类设置
1 parent 7fde048 commit d8cfb8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DependencyInjection/Compiler/AopAttributeCompilerPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ public function process(ContainerBuilder $container): void
6161
$statements[$instance->statement][$name][] = [$serviceId, $method->getName()];
6262
// 强制修改为public,方便Interceptor去动态执行
6363
$definition = $container->findDefinition($serviceId);
64-
// 减少不必要的初始化成本
65-
$definition->setLazy(true);
64+
// Aspect的类如果改为Lazy,可能会导致注入逻辑不符合预期
65+
// $definition->setLazy(true);
6666
$definition->setPublic(true);
6767
}
6868
}

0 commit comments

Comments
 (0)