services.yml
mea.twig.JsExtension:
alias: Mea\CoreBundle\Twig\MeaExtension
public: true
arguments: ["@service_container","@kernel", "@mea.metatags", "@mea.asset"]
tags:
- { name: twig.extension }
给出错误
InvalidArgumentException
Unable to replace alias "mea.twig.JsExtension" with actual definition "Mea\CoreBundle\Twig\MeaExtension".
in ReplaceAliasByActualDefinitionPass.php (line 57)
at ReplaceAliasByActualDefinitionPass->process(object(ContainerBuilder))
in Compiler.php (line 141)
at Compiler->compile(object(ContainerBuilder))
in ContainerBuilder.php (line 759)
at ContainerBuilder->compile()
in Kernel.php (line 643)
Symfony 3.4
答案 0 :(得分:0)
有4种可能的原因,Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
类型的例外情况可能会完全忽视它们:
ServiceNotFoundException
; ParameterNotFoundException
; EnvNotFoundException
; EnvParameterException
。我确信第一个例外是您问题的真正原因。