将参数包含到另一个参数时,参数未找到异常

时间:2015-01-14 11:04:03

标签: php symfony yaml

parameters:
     bundles:
        liveupload: 'GabrielLiveUploadBundle' 
     entities:
        liveupload_post: "%bundles.liveupload%:Post"

此代码抛出错误

  

ParameterNotFoundException:参数" entities"有一个依赖   在一个不存在的参数" bundles.liveupload"。

有没有办法解决这个问题?

1 个答案:

答案 0 :(得分:0)

试试这个语法:

parameters:
    bundles.liveupload: 'GabrielLiveUploadBundle' 
    entities:
        liveupload_post: "%bundles.liveupload%:Post"