Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify access to class reflections in ClassPropertiesNode rules. #2520

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

mad-briller
Copy link
Contributor

No description provided.

@mad-briller mad-briller changed the title Simplify access to class reflections in ClassPropertiesNode. Simplify access to class reflections in ClassPropertiesNode rules. Jul 8, 2023
throw new ShouldNotHappenException();
}
$classReflection = $scope->getClassReflection();
$classReflection = $this->getClassReflection();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the $scope param on this method is no longer used as we can access the class reflection on the node now, however removing it would be a BC break and this class is covered by @api so i just left it there

@mad-briller mad-briller force-pushed the class-properties-node branch 2 times, most recently from 6007f2e to 7845798 Compare July 8, 2023 10:55
@ondrejmirtes
Copy link
Member

I could see a scenario where this would be a BC break (you don't know which Scope the user was passing into the method) but in practice it's very unlikely. Thank you!

@ondrejmirtes ondrejmirtes merged commit a0027b5 into phpstan:1.10.x Jul 11, 2023
406 checks passed
@mad-briller
Copy link
Contributor Author

that's a great point i didn't consider to be honest yeah... it would be a weird way to use the node + scope together though

i'll try to get to the pr feedbacks after work later, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants