Skip to content

Fix supertype checks between static and final class#1703

Merged
ondrejmirtes merged 1 commit intophpstan:1.8.xfrom
rvanvelzen:bug-7717
Sep 6, 2022
Merged

Fix supertype checks between static and final class#1703
ondrejmirtes merged 1 commit intophpstan:1.8.xfrom
rvanvelzen:bug-7717

Conversation

@rvanvelzen
Copy link
Copy Markdown
Contributor

@ondrejmirtes
Copy link
Copy Markdown
Member

Because of the static keyword, the code sample probably shouldn't be tested before 8.0. The failures on 7.2 and 7.3 is because this RFC is in effect since 7.4: https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters

@ondrejmirtes ondrejmirtes merged commit e9ccd47 into phpstan:1.8.x Sep 6, 2022
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you!

@rvanvelzen rvanvelzen deleted the bug-7717 branch September 6, 2022 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect covariant error in final class with methods that return static, when using generics

2 participants