【发布时间】:2014-06-30 02:08:35
【问题描述】:
这是我期望的正常工作:
-
parameters.yml
host: main: example.com -
app/config/config.yml
twig: globals: hosts_main: %host.main%
但是抛出异常:
[Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]
You have requested a non-existent parameter "host.main".
而且我在文档中找不到任何示例。 奇怪的。 例如,Incenteev\ParameterHandler\ScriptHandler::buildParameters() 如果 .dist 文件中有一个,并且两个结构在 YAML 方面相等,则用映射替换“流”表示法,但 Symfony 本身似乎不理解 YAML。
谁能建议一些适当的解决方法。
【问题讨论】:
标签: symfony parameters yaml configuration-files