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

Make ReadWritePropertiesExtensionProvider part of API #1480

Conversation

olsavmic
Copy link
Contributor

@olsavmic olsavmic commented Jun 29, 2022

Custom rules as such https://github.com/shipmonk-rnd/phpstan-rules/blob/master/src/Rule/UselessPrivatePropertyNullabilityRule.php need access to registered ReadWritePropertiesExtension[] for seamless configuration.

@ondrejmirtes
Copy link
Member

I did something that makes more sense to me: 49c27d8

You no longer have to pass $extensions to ClassPropertiesNode::getUninitializedProperties(). You can omit this argument and everything will work as expected :)

If you have extensions referenced in a rule test case, move them from the rule constructor to a new overriden method getReadWritePropertiesExtensions.

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