Bug Report
| Subject |
Details |
| Rector version |
last dev-main |
| Installed as |
composer dependency |
Rector changes variadic argument type to array when passing arguments using a splat operator.
Minimal PHP Code Causing Issue
See https://getrector.com/demo/726efeee-2c58-4ed5-8c10-73e9416145a5
<?php
declare(strict_types=1);
final class Bug
{
/**
* @param list<int> $list
*/
public function __construct(array $list)
{
$this->process(...$list);
}
private function process(int ...$variadic): void
{
}
}
Responsible rules
AddMethodCallBasedStrictParamTypeRector
Expected Behavior
Rector should skip it or choose a correct type.