diff --git a/packages/ChangesReporting/Annotation/AnnotationExtractor.php b/packages/ChangesReporting/Annotation/AnnotationExtractor.php index 418b163014f8..013e32c82c8c 100644 --- a/packages/ChangesReporting/Annotation/AnnotationExtractor.php +++ b/packages/ChangesReporting/Annotation/AnnotationExtractor.php @@ -25,9 +25,11 @@ public function extractAnnotationFromClass(string $className, string $annotation return null; } - // @see https://regex101.com/r/oYGaWU/1 - $pattern = '#' . preg_quote($annotation, '#') . '\s+(?.*?)$#m'; + // @see https://3v4l.org/ouYfB + // uses '\r?\n' instead of '$' because windows compat + $pattern = '#' . preg_quote($annotation, '#') . '\s+(?.*?)\r?\n#m'; $matches = Strings::match($docComment, $pattern); + return $matches['content'] ?? null; } }