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
3737 }
3838 }
3939
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+
4051 // get all tags used in findTaggedServiceIds calls()
4152 $ files = Finder::create ()->files ()->name ('*.php ' )->path ('DependencyInjection ' )->notPath ('Tests ' )->in (\dirname (__DIR__ , 5 ));
4253 foreach ($ files as $ file ) {
You can’t perform that action at this time.
0 commit comments