Bug report
When using an interface (I) to enforce a constructor signature on a class (A), the constructor parameters of subclasses are incorrectly checked for contravariance against the constructor of A, not I::__construct().
Code snippet that reproduces the problem
https://phpstan.org/r/823968be-46b6-4251-b541-7b34a88d6205
Expected output
If A adds optional arguments after parameters mandated by the interface, they should be excluded from consideration when checking subclass constructors.
This code should not trigger an error.
Did PHPStan help you today? Did it make you happy in any way?
No response