minor #26049 [DI] minor: use a strict comparison in setDecoratedService (dunglas)

This PR was merged into the 2.7 branch.

Discussion
----------

[DI] minor: use a strict comparison in setDecoratedService

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

f167b50 [DI] minor: use a strict comparision in setDecoratedService
This commit is contained in:
Nicolas Grekas 2018-02-06 11:19:30 +01:00
commit 7ac5447f57
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ class Definition
*/
public function setDecoratedService($id, $renamedId = null)
{
if ($renamedId && $id == $renamedId) {
if ($renamedId && $id === $renamedId) {
throw new \InvalidArgumentException(sprintf('The decorated service inner name for "%s" must be different than the service name itself.', $id));
}