0

我想覆盖 templating.name_parser.class 但我想在 FrameworkBundle 之后加载的自定义配置包中做一些事情。现在我要做的是:

  1. 将配置文件放在 customBundle/Resources/config/ 中

  2. 通过将其添加到自定义包中重新运行模板传递:

    $container->addCompilerPass(new TemplatingPass());

我想知道这是否是最好的方法?(我知道我可以将配置放在 app/config 中)但如果可能的话,我想将此配置放在 customBundle 中,以确保所有包的特定配置都放在包中。

4

0 回答 0