Symfony服务严格参数

med*_*ock 3 dependency-injection symfony

有没有人知道在Symfony中注入服务时"严格"参数的作用?

例如:

<service ...>
    <argument type="service" id="whatever" strict=false />
</service>
Run Code Online (Sandbox Code Playgroud)

谢谢!

mar*_*tin 6

我做了一些研究,这是Symfony 2.8遗留物,因为这条评论暗示:

注意:$ strict参数自版本2.8起不推荐使用,将在3.0中删除.

由于3.0的参数不存在,以及弃用警告,但类YamlFileLoaderXmlFileLoader即使还是阅读Reference类只有两个参数.

所以,这个参数什么都不做:).