-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Change: Remove __constructor() from RuleSetDescriptionInterface #6084
Change: Remove __constructor() from RuleSetDescriptionInterface #6084
Conversation
Constructor should be defined by the implementation, not by the interface.
The issue would be that This might be an issue when relying on a construct like I know it is an example, but I think the fact if a set is risky or not might be better set in the set itself (either derived from the rules it is has configured or hardcoded), than passed along. Thanks for sharing your thoughts! Would like to hear from others on this as well 👍 |
The interface is |
I have to admit I didn't consider the interface to be marked as I would suggest making the interface public, so IDEs will not complain when using it outside the main project. This requirement is related to my other PR, #6083. Tho, as |
Making the interface public will indeed very likely happen if any of the two PR's go. |
One more option is to have one public interface, and have an internal interface extending the public one with constructor defined? To me |
Thank you @niklam. |
As it is internal we already cover the constructor behavior in the utest so don't need it on the interface 👍 |
Thanks, @SpacePossum! What do you see as the best way to make this interface public? Do you think we could just make this one public, or should there be one as descendant/ancestor of this interface? |
I suspect it will be |
Constructor should be defined by the implementation, not by the interface.
With this change one could do, which is not possible at the moment due to the interface defining constructor with no parameters.
This would allow doing something like