diff --git a/build/generate-registry-annotations.php b/build/generate-registry-annotations.php index f7dce3c50..11e15a3c6 100644 --- a/build/generate-registry-annotations.php +++ b/build/generate-registry-annotations.php @@ -91,7 +91,7 @@ foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($argv[1], throw new \RuntimeException("Failed to get contents of $file"); } - if(preg_match("/^namespace (.+);$/m", $contents, $matches) !== 1 || preg_match('/^((final|abstract)\s+)?class /m', $contents) !== 1){ + if(preg_match("/(*ANYCRLF)^namespace (.+);$/m", $contents, $matches) !== 1 || preg_match('/(*ANYCRLF)^((final|abstract)\s+)?class /m', $contents) !== 1){ continue; } $shortClassName = basename($file, ".php"); @@ -101,7 +101,7 @@ foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($argv[1], } $reflect = new \ReflectionClass($className); $docComment = $reflect->getDocComment(); - if($docComment === false || preg_match("/^\s*\*\s*@generate-registry-docblock$/m", $docComment) !== 1){ + if($docComment === false || preg_match("/(*ANYCRLF)^\s*\*\s*@generate-registry-docblock$/m", $docComment) !== 1){ continue; } echo "Found registry in $file\n";