Skip to content

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
@mad-briller mad-briller force-pushed the class-properties-node branch from 7845798 to c9a9d9f Compare July 8, 2023 11:14
@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
@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

Development

Successfully merging this pull request may close these issues.

2 participants