Permalink
Browse files

minor #21058 [DI] deprecate the strict attribute (xabbuh)

This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] deprecate the strict attribute

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #20938 (comment)
| License       | MIT
| Doc PR        |

Commits
-------

49cb4db [DI] deprecate the strict attribute
  • Loading branch information...
2 parents 10c9d19 + 49cb4db commit 5e5a88cc67c9d58c95dd268c0d670e9df2aa2cfd @fabpot fabpot committed Jan 30, 2017
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
@@ -474,6 +474,10 @@ private function getArgumentsAsPhp(\DOMElement $node, $name, $lowercase = true)
switch ($arg->getAttribute('type')) {
case 'service':
+ if ($arg->hasAttribute('strict')) {
+ @trigger_error(sprintf('The "strict" attribute used when referencing the "%s" service is deprecated since version 3.3 and will be removed in 4.0.', $arg->getAttribute('id')), E_USER_DEPRECATED);
+ }
+
$arguments[$key] = new Reference($arg->getAttribute('id'), $invalidBehavior);
break;
case 'expression':

0 comments on commit 5e5a88c

Please sign in to comment.