go to bug id or search bugs for
With the addition of tentative return types for PDO, we saw this new deprecation show up in generated mock code.
Declaration of Mock_PDO_f5cc810f::getAttribute(int $attribute) should be compatible with PDO::getAttribute(int $attribute): mixed
This requires the use of the new `mixed` return type available in php 8 only.
Isn't the return type `mixed` when omitted and therefore compatible with the declared tentative return type?
Add a Patch
Add a Pull Request
An no type is considered the same as a hypothetical "mixed|void", no type is not considered covariantly compatible with mixed.
In this case it's necessary to either generate the ": mixed" type, or to generate a "#[ReturnTypeWillChange]" attribute.
Ah, I was not aware of the attribute. That will have to be the work around if no return is mixed|void.