From c33c34a3eb5b08c5b63a852a5ec7102445fb9aaa Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 13 Nov 2026 13:54:01 +0700 Subject: [PATCH] fix: Allow xml-model processing instruction in Psr1PhpTagsRule --- src/Util/InlineHtmlOpeningTagMatcher.php | 2 +- tests/Analyser/FileAnalysisProviderTest.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Util/InlineHtmlOpeningTagMatcher.php b/src/Util/InlineHtmlOpeningTagMatcher.php index 939b366c..05f4c480 100644 --- a/src/Util/InlineHtmlOpeningTagMatcher.php +++ b/src/Util/InlineHtmlOpeningTagMatcher.php @@ -11,7 +11,7 @@ final class InlineHtmlOpeningTagMatcher { - private const ALLOWED_TAGS = 'php|xml|xml\-stylesheet'; + private const ALLOWED_TAGS = 'php|xml|xml-stylesheet|xml-model'; public static function invalidInlineHtmlTagOffset(string $text, int $offset = 0): ?int { diff --git a/tests/Analyser/FileAnalysisProviderTest.php b/tests/Analyser/FileAnalysisProviderTest.php index 6520b791..635d6221 100644 --- a/tests/Analyser/FileAnalysisProviderTest.php +++ b/tests/Analyser/FileAnalysisProviderTest.php @@ -309,6 +309,8 @@ public static function lightweightAnalysisProvider(): iterable yield 'echo tag' => [' ['', false, true, null]; yield 'XML stylesheet' => ['', false, true, null]; + yield 'XML model' => ['', false, true, null]; + yield 'XML model lookalike' => ['', false, true, 1]; yield 'arbitrary XML processing instruction' => ['', false, true, 1]; yield 'plain text' => ['plain text', false, true, null]; }