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

Is ClassMethodAdded minor or major change ? #57

Closed
koriym opened this issue Mar 25, 2015 · 2 comments
Closed

Is ClassMethodAdded minor or major change ? #57

koriym opened this issue Mar 25, 2015 · 2 comments
Labels

Comments

@koriym
Copy link

koriym commented Mar 25, 2015

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 ?

@tomzx
Copy link
Owner

tomzx commented Mar 25, 2015

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 tomzx added the question label Mar 25, 2015
@koriym
Copy link
Author

koriym commented Mar 25, 2015

@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.

@koriym koriym closed this as completed Mar 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants