Skip to content

Commit 8739103

Browse files
fix(YAML): Enable YAML custom tags support (#3456991 by Grimreaper)
1 parent 10a7be4 commit 8739103

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

coder_sniffer/DrupalPractice/Project.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public static function isServiceClass(File $phpcsFile, $classPtr)
190190
return false;
191191
}
192192

193-
$services = Yaml::parse(file_get_contents($ymlFile));
193+
$services = Yaml::parse(file_get_contents($ymlFile), Yaml::PARSE_CUSTOM_TAGS);
194194
if (isset($services['services']) === false) {
195195
$cache[$phpcsFile->getFilename()] = false;
196196
return false;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
services:
22
testmodule.example:
33
class: Drupal\testmodule\ExampleService
4+
5+
testmodule.test_tagged_iterator:
6+
class: Drupal\testmodule\ExampleService
7+
arguments:
8+
- !tagged_iterator coder_test

0 commit comments

Comments
 (0)