Skip to content

Commit d2dfa72

Browse files
committed
[FrameworkBundle] Add support for tagged_iterator/tagged_locator in unused tags util
1 parent d17d70f commit d2dfa72

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Tests/DependencyInjection/Compiler/UnusedTagsPassUtils.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ public static function getDefinedTags(): array
4646
$tags[$match] = true;
4747
}
4848
}
49+
if (preg_match_all("{tagged_(?:locator|iterator)\('([^']+)'}", $contents, $matches)) {
50+
foreach ($matches[1] as $match) {
51+
$tags[$match] = true;
52+
}
53+
}
4954
}
5055

5156
// get all tags used in findTaggedServiceIds calls()

0 commit comments

Comments
 (0)