我在 config.yml 中有:
parameters:
aaa:
bbb: 'Example'
Run Code Online (Sandbox Code Playgroud)
如果我在服务中通过了这个:
AppBundle\Service\Service:
arguments:
$bbb: '%aaa%'
Run Code Online (Sandbox Code Playgroud)
然后这运行良好,我有数组,但如果我通过:
AppBundle\Service\Service:
arguments:
$bbb: '%aaa.bbb%'
Run Code Online (Sandbox Code Playgroud)
然后我有错误:
服务“AppBundle\Service\Service”依赖于不存在的参数“aaa.bbb”。您无法访问嵌套数组项,是否要注入“aaa”?
可以只传递一个值吗?