diff --git a/build/gen_stub.php b/build/gen_stub.php index cb9b1590f94..53346461cb3 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -54,7 +54,7 @@ function processDirectory(string $dir, Context $context): array { ); foreach ($it as $file) { $pathName = $file->getPathName(); - if (preg_match('/\.stub\.php$/', $pathName)) { + if (substr($pathName, -9) === '.stub.php') { $pathNames[] = $pathName; } }