mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Validate constructor property promotion in stubs
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user