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
Fix tentative return type check for overridden methods with intermediate prototypes
- OverridingMethodRule now also checks the parent class method's own tentative return type, not just the deepest prototype's
- This fixes the case where SimpleXMLElement::current() has tentative return type ?static but the check only saw Iterator::current() with tentative type mixed
- Updated $reportReturnType logic to suppress regular return type errors when the parent class method has a tentative return type
- Added regression test for phpstan/phpstan#7317Closesphpstan/phpstan#7317
'Return type bool of method Bug7317\MySimpleXMLElement::current() is not covariant with tentative return type static(SimpleXMLElement)|null of method SimpleXMLElement::current().',
843
+
8,
844
+
$tipText,
845
+
],
846
+
[
847
+
'Return type int of method Bug7317\MySimpleXMLElement::valid() is not covariant with tentative return type bool of method Iterator<string,static(SimpleXMLElement)>::valid().',
0 commit comments