Is ClassMethodAdded minor or major change ?
koriym opened this issue · comments
Listed as MINOR in http://www.reddit.com/r/PHP/comments/2s0f7t/php_semantic_versioning_checker/
Class method added -> MINOR
But list as MAJOR in docs/Ruleset.md
V015 MAJOR Class public method added
Or am I missing something ?
Hello @koriym,
First off, consider the ruleset to have any prevalence over anything else lying around the web. Secondly, with recent changes, it is possible to make any rule generate the level you want. If you do not agree with the default ruleset, you can override it.
Finally, there's a couple more things to take into consideration. V015
is about public
class methods. V015
is also about non final
classes, as there's currently two issues (#49, #51) regarding the support of the final
modifier.
When it was first written on reddit, I didn't have strict semantic versioning in mind. It makes sense to say that adding a method on a class that isn't meant to be used by external clients will generate a MINOR
level. However, semantic versioning considers that if the class is to be extended by the client (the user of the library), adding a method MAY intersect with an existing method, thus making it critical to the user to know (and thus a MAJOR
change).
Hope this all makes sense!
@tomzx Thank you for the clarify. Semver seems harder than it looks and I think your tool helps to understand it. Thank you.
adding a method MAY intersect with an existing method, thus making it critical to the user to know (and thus a MAJOR change).
I see... it is possible.