如果在服务中注入太多服务会怎样???记忆视角?

What happen if inject too many services in a service ??? memory perpective?

我有一项服务,我在 Symfony 框架中注入了太多服务 (10-15)(我认为框架无关紧要)。

有多个service injection types and they all come with advantages/disadvantages. If you're talking about optional dependencies, setter injection可能是一种方法。