Skip to content

Commit 7ac5447

Browse files
minor symfony#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
2 parents 5cf79cc + f167b50 commit 7ac5447

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/DependencyInjection/Definition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function setFactoryMethod($factoryMethod)
144144
*/
145145
public function setDecoratedService($id, $renamedId = null)
146146
{
147-
if ($renamedId && $id == $renamedId) {
147+
if ($renamedId && $id === $renamedId) {
148148
throw new \InvalidArgumentException(sprintf('The decorated service inner name for "%s" must be different than the service name itself.', $id));
149149
}
150150

0 commit comments

Comments
 (0)