Skip to content

Commit 7075706

Browse files
committed
Remove @sensitive-param support from build/gen_stub.php
1 parent b9e67fd commit 7075706

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
@@ -3151,7 +3151,7 @@ public function getVariableName(): string {
31513151

31523152
if ($this->name === "param") {
31533153
preg_match('/^\s*[\w\|\\\\\[\]]+\s*\$(\w+).*$/', $value, $matches);
3154-
} elseif ($this->name === "prefer-ref" || $this->name === "sensitive-param") {
3154+
} elseif ($this->name === "prefer-ref") {
31553155
preg_match('/^\s*\$(\w+).*$/', $value, $matches);
31563156
}
31573157

@@ -3242,7 +3242,6 @@ function parseFunctionLike(
32423242
break;
32433243

32443244
case 'prefer-ref':
3245-
case 'sensitive-param':
32463245
$varName = $tag->getVariableName();
32473246
if (!isset($paramMeta[$varName])) {
32483247
$paramMeta[$varName] = [];
@@ -3260,15 +3259,11 @@ function parseFunctionLike(
32603259
foreach ($func->getParams() as $i => $param) {
32613260
$varName = $param->var->name;
32623261
$preferRef = !empty($paramMeta[$varName]['prefer-ref']);
3263-
$isSensitive = !empty($paramMeta[$varName]['sensitive-param']);
3262+
$isSensitive = false;
32643263
foreach ($param->attrGroups as $attrGroup) {
32653264
foreach ($attrGroup->attrs as $attr) {
32663265
switch ($attr->name->toCodeString()) {
32673266
case '\\SensitiveParameter':
3268-
if ($isSensitive) {
3269-
throw new Exception("Redundant {$attr->name->toCodeString()} declaration.");
3270-
}
3271-
32723267
$isSensitive = true;
32733268
break;
32743269
default:

0 commit comments

Comments
 (0)