Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Mar 2, 2025

I found https://phpstan.org/r/0299facc-d23d-4ed8-9567-e1c7c8c30536 which I think should not report a error on line 9 on PHP 8.4

https://3v4l.org/ZD4oE

@@ -93,6 +93,10 @@ public function processNode(Node $node, Scope $scope): array
continue;
}

if ($propertyReflection->isAbstract()->yes()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this is a wrong fix. Instead, the foreach over the hooks above should check if the get hook has a body or not.

@staabm staabm marked this pull request as ready for review March 2, 2025 11:05
@ondrejmirtes ondrejmirtes merged commit 2d24ffc into phpstan:2.1.x Mar 2, 2025
100 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@staabm staabm deleted the abstract-hook branch March 6, 2025 09:46
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.

3 participants