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:
commit
7ac5447f57
@ -144,7 +144,7 @@ class Definition
|
|||||||
*/
|
*/
|
||||||
public function setDecoratedService($id, $renamedId = null)
|
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));
|
throw new \InvalidArgumentException(sprintf('The decorated service inner name for "%s" must be different than the service name itself.', $id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user