Skip to content

Commit

Permalink
minor #21058 [DI] deprecate the strict attribute (xabbuh)
Browse files Browse the repository at this point in the history
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
fabpot committed Jan 30, 2017
2 parents 10c9d19 + 49cb4db commit 5e5a88c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -474,6 +474,10 @@ private function getArgumentsAsPhp(\DOMElement $node, $name, $lowercase = true)


switch ($arg->getAttribute('type')) { switch ($arg->getAttribute('type')) {
case 'service': 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); $arguments[$key] = new Reference($arg->getAttribute('id'), $invalidBehavior);
break; break;
case 'expression': case 'expression':
Expand Down

0 comments on commit 5e5a88c

Please sign in to comment.