Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony service strict parameter

Does anyone know what the "strict" parameter does when injecting a service in Symfony ?

For example:

<service ...>
    <argument type="service" id="whatever" strict=false />
</service>

Thank you!

like image 853
medowlock Avatar asked Aug 31 '25 18:08

medowlock


1 Answers

I did some research and it's a leftover from Symfony 2.8 as this comment suggests:

Note: The $strict parameter is deprecated since version 2.8 and will be removed in 3.0.

Since 3.0 the parameter doesn't exist as well as the deprecation warning but classes YamlFileLoader and XmlFileLoader still read it even though the Reference class takes only two arguments.

So, this parameter does nothing :).

like image 174
martin Avatar answered Sep 02 '25 16:09

martin