Skip to content

Commit

Permalink
fix(YAML): Enable YAML custom tags support (#3456991 by Grimreaper)
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentTorregrosa authored Jun 28, 2024
1 parent 10a7be4 commit 8739103
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion coder_sniffer/DrupalPractice/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions tests/DrupalPractice/Objects/testmodule.services.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
services:
testmodule.example:
class: Drupal\testmodule\ExampleService

testmodule.test_tagged_iterator:
class: Drupal\testmodule\ExampleService
arguments:
- !tagged_iterator coder_test

0 comments on commit 8739103

Please sign in to comment.