Skip to content

Commit d121af5

Browse files
committed
Remove @sensitive-param support from build/gen_stub.php
1 parent 3ae948a commit d121af5

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

build/gen_stub.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2967,7 +2967,7 @@ public function getVariableName(): string {
29672967

29682968
if ($this->name === "param") {
29692969
preg_match('/^\s*[\w\|\\\\\[\]]+\s*\$(\w+).*$/', $value, $matches);
2970-
} elseif ($this->name === "prefer-ref" || $this->name === "sensitive-param") {
2970+
} elseif ($this->name === "prefer-ref") {
29712971
preg_match('/^\s*\$(\w+).*$/', $value, $matches);
29722972
}
29732973

@@ -3058,7 +3058,6 @@ function parseFunctionLike(
30583058
break;
30593059

30603060
case 'prefer-ref':
3061-
case 'sensitive-param':
30623061
$varName = $tag->getVariableName();
30633062
if (!isset($paramMeta[$varName])) {
30643063
$paramMeta[$varName] = [];
@@ -3076,15 +3075,11 @@ function parseFunctionLike(
30763075
foreach ($func->getParams() as $i => $param) {
30773076
$varName = $param->var->name;
30783077
$preferRef = !empty($paramMeta[$varName]['prefer-ref']);
3079-
$isSensitive = !empty($paramMeta[$varName]['sensitive-param']);
3078+
$isSensitive = false;
30803079
foreach ($param->attrGroups as $attrGroup) {
30813080
foreach ($attrGroup->attrs as $attr) {
30823081
switch ($attr->name->toCodeString()) {
30833082
case '\\SensitiveParameter':
3084-
if ($isSensitive) {
3085-
throw new Exception("Redundant {$attr->name->toCodeString()} declaration.");
3086-
}
3087-
30883083
$isSensitive = true;
30893084
break;
30903085
default:

0 commit comments

Comments
 (0)