You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[BC] CHANGED: Default parameter value for parameter $nextAutoIndex of PHPStan\Type\Constant\ConstantArrayType#__construct() changed from 0 to array (
0 => 0,
)
[BC] CHANGED: The parameter $nextAutoIndex of PHPStan\Type\Constant\ConstantArrayType#__construct() changed from int to a non-contravariant int|array
[BC] CHANGED: The parameter $nextAutoIndex of PHPStan\Type\Constant\ConstantArrayType#__construct() changed from int to int|array
I'm widening the type of the parameter, and if the argument is omitted from the call, or if the old type is passed to the parameter, the result is the same.
I don't see how this is a BC break, but I'm open to be corrected :) Thanks.
The text was updated successfully, but these errors were encountered:
Ah, brain fart: of course child classes cannot reduce the type of a parameter, so that's what is tripping this analysis.
We really just need to exclude constructors, like we do exclude methods for final classes, because the BC break is valid for inheritance, just not for __construct()
Hi, I've got these messages:
This is how the PHP diff looks like:
I'm widening the type of the parameter, and if the argument is omitted from the call, or if the old type is passed to the parameter, the result is the same.
I don't see how this is a BC break, but I'm open to be corrected :) Thanks.
The text was updated successfully, but these errors were encountered: