diff --git a/coder_sniffer/DrupalPractice/Project.php b/coder_sniffer/DrupalPractice/Project.php index a2f3db5b..c7d6a6a5 100644 --- a/coder_sniffer/DrupalPractice/Project.php +++ b/coder_sniffer/DrupalPractice/Project.php @@ -190,7 +190,7 @@ public static function isServiceClass(File $phpcsFile, $classPtr) return false; } - $services = Yaml::parse(file_get_contents($ymlFile)); + $services = Yaml::parse(file_get_contents($ymlFile), Yaml::PARSE_CUSTOM_TAGS); if (isset($services['services']) === false) { $cache[$phpcsFile->getFilename()] = false; return false; diff --git a/tests/DrupalPractice/Objects/testmodule.services.yml b/tests/DrupalPractice/Objects/testmodule.services.yml index 98f3a51e..b680731f 100644 --- a/tests/DrupalPractice/Objects/testmodule.services.yml +++ b/tests/DrupalPractice/Objects/testmodule.services.yml @@ -1,3 +1,8 @@ services: testmodule.example: class: Drupal\testmodule\ExampleService + + testmodule.test_tagged_iterator: + class: Drupal\testmodule\ExampleService + arguments: + - !tagged_iterator coder_test