File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Tests/DependencyInjection/Compiler Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,17 @@ public static function getDefinedTags(): array
37
37
}
38
38
}
39
39
40
+ // get all tags used in PHP configs
41
+ $ files = Finder::create ()->files ()->name ('*.php ' )->path ('Resources ' )->notPath ('Tests ' )->in (\dirname (__DIR__ , 5 ));
42
+ foreach ($ files as $ file ) {
43
+ $ contents = file_get_contents ($ file );
44
+ if (preg_match_all ("{->tag\('([^']+)'} " , $ contents , $ matches )) {
45
+ foreach ($ matches [1 ] as $ match ) {
46
+ $ tags [$ match ] = true ;
47
+ }
48
+ }
49
+ }
50
+
40
51
// get all tags used in findTaggedServiceIds calls()
41
52
$ files = Finder::create ()->files ()->name ('*.php ' )->path ('DependencyInjection ' )->notPath ('Tests ' )->in (\dirname (__DIR__ , 5 ));
42
53
foreach ($ files as $ file ) {
You can’t perform that action at this time.
0 commit comments