Skip to content

Commit 14b31f2

Browse files
committed
Remove @sensitive-param support from build/gen_stub.php
1 parent 2c36c2e commit 14b31f2

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

30333033
if ($this->name === "param") {
30343034
preg_match('/^\s*[\w\|\\\\\[\]]+\s*\$(\w+).*$/', $value, $matches);
3035-
} elseif ($this->name === "prefer-ref" || $this->name === "sensitive-param") {
3035+
} elseif ($this->name === "prefer-ref") {
30363036
preg_match('/^\s*\$(\w+).*$/', $value, $matches);
30373037
}
30383038

@@ -3123,7 +3123,6 @@ function parseFunctionLike(
31233123
break;
31243124

31253125
case 'prefer-ref':
3126-
case 'sensitive-param':
31273126
$varName = $tag->getVariableName();
31283127
if (!isset($paramMeta[$varName])) {
31293128
$paramMeta[$varName] = [];
@@ -3141,15 +3140,11 @@ function parseFunctionLike(
31413140
foreach ($func->getParams() as $i => $param) {
31423141
$varName = $param->var->name;
31433142
$preferRef = !empty($paramMeta[$varName]['prefer-ref']);
3144-
$isSensitive = !empty($paramMeta[$varName]['sensitive-param']);
3143+
$isSensitive = false;
31453144
foreach ($param->attrGroups as $attrGroup) {
31463145
foreach ($attrGroup->attrs as $attr) {
31473146
switch ($attr->name->toCodeString()) {
31483147
case '\\SensitiveParameter':
3149-
if ($isSensitive) {
3150-
throw new Exception("Redundant {$attr->name->toCodeString()} declaration.");
3151-
}
3152-
31533148
$isSensitive = true;
31543149
break;
31553150
default:

0 commit comments

Comments
 (0)