[FrameworkBundle] Add support for tagged_iterator/tagged_locator in unused tags util

This commit is contained in:
Fabien Potencier 2020-06-11 08:03:43 +02:00
parent 9b08626180
commit 164ca90d89

View File

@ -46,6 +46,11 @@ class UnusedTagsPassUtils
$tags[$match] = true;
}
}
if (preg_match_all("{tagged_(?:locator|iterator)\('([^']+)'}", $contents, $matches)) {
foreach ($matches[1] as $match) {
$tags[$match] = true;
}
}
}
// get all tags used in findTaggedServiceIds calls()