From 5ae87ffef4957ef352ac08226e04cce6897d82ef Mon Sep 17 00:00:00 2001 From: Daniel Scherzer Date: Thu, 15 May 2025 15:03:04 -0400 Subject: [PATCH] gen_stub: avoid unneeded regex match --- build/gen_stub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } }