From 75e53dd05c8a0412d2dc2877c860e972c7ce41dd Mon Sep 17 00:00:00 2001 From: SakiTakamachi Date: Tue, 24 Jun 2025 15:03:54 +0900 Subject: [PATCH] Allowed the use of formats like `@param array<>` --- 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 ff86106e8a2a..7d94e885b6ab 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -4535,7 +4535,7 @@ public function getVariableName(): string { if ($this->name === "param") { // Allow for parsing extended types like callable(string):mixed in docblocks - preg_match('/^\s*(?[\w\|\\\\]+(?\((?(?:(?&parens)|[^(){}[\]]*+))++\)|\{(?&inparens)\}|\[(?&inparens)\])*+(?::(?&type))?)\s*\$(?\w+).*$/', $value, $matches); + preg_match('/^\s*(?[\w\|\\\\]+(?\((?(?:(?&parens)|[^(){}[\]<>]*+))++\)|\{(?&inparens)\}|\[(?&inparens)\]|<(?&inparens)>)*+(?::(?&type))?)\s*\$(?\w+).*$/', $value, $matches); } elseif ($this->name === "prefer-ref") { preg_match('/^\s*\$(?\w+).*$/', $value, $matches); }