Skip to content

Commit c298f8e

Browse files
committed
feature #37198 [FrameworkBundle] Add support for tagged_iterator/tagged_locator in unused tags util (fabpot)
This PR was merged into the 5.2-dev branch. Discussion ---------- [FrameworkBundle] Add support for tagged_iterator/tagged_locator in unused tags util | Q | A | ------------- | --- | Branch? | master <!-- see below --> | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | n/a <!-- prefix each issue number with "Fix #", if any --> | License | MIT | Doc PR | n/a /cc @stof :) Commits ------- 164ca90d89 [FrameworkBundle] Add support for tagged_iterator/tagged_locator in unused tags util
2 parents 5240c6f + d2dfa72 commit c298f8e

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)