mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Validate constructor property promotion in stubs
This commit is contained in:
parent
20c49f8524
commit
115c60e0bb
1 changed files with 4 additions and 0 deletions
|
@ -3947,6 +3947,10 @@ function parseFunctionLike(
|
|||
$numRequiredArgs = 0;
|
||||
$foundVariadic = false;
|
||||
foreach ($func->getParams() as $i => $param) {
|
||||
if ($param->isPromoted()) {
|
||||
throw new Exception("Promoted properties are not supported");
|
||||
}
|
||||
|
||||
$varName = $param->var->name;
|
||||
$preferRef = !empty($paramMeta[$varName]['prefer-ref']);
|
||||
unset($paramMeta[$varName]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue