-
Notifications
You must be signed in to change notification settings - Fork 28
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
Functions Added To Interfaces Must Be A Major Version Bump #10
Comments
Are methods added to an interface necessarily a major version bump? From what I understand of semver, as long as you are not breaking anything (making incompatible API changes), a minor bump is good enough. |
If someone is implementing an interface and you add a method, you cause a php fatal error. |
Well, if you add a new method to an interface you will most likely get that error before committing the source code, which means you either fix the issue by implementing the method or moving it to a different interface. I think its still not a major version bump. |
@drgomesp You're missing the point. If I have an interface that other people are using, I must not add methods to it. It will break their code. We MUST bump the major version. |
The fact that this requires a major version bump isn't up for discussion - it does. I'm reporting this as a missing check in this software. |
Renamed ClassMethodParameterMismatch to ClassMethodParameterChanged. Bump composer branch-alias to 0.2-dev. Added various fixtures to tests/fixtures. Initial code for Interface and Trait. [#10] Adding methods to an interface should generate a MAJOR
Renamed ClassMethodParameterMismatch to ClassMethodParameterChanged. Bump composer branch-alias to 0.2-dev. Added various fixtures to tests/fixtures. Initial code for Interface and Trait. [#10] Adding methods to an interface should generate a MAJOR
[#17] Verification codes Point toward a custom branch of php-parser (hopefully temporarily).
Also, changing the method signature of any method in an interface must be a major version bump too. |
We can't modify typehints or add params etc. |
@GrahamCampbell If you take a look at the Ruleset, this is already covered by V035 and V036. |
Ok, cool. I'll take a look at that in more detail at the weekend. :) |
With regard to a non stable API (i.e. a V0.x.x), is a minor version bump the way to go when adding a new method to an interface? |
@rquadling From my understanding of the spec, while you're developing a non-stable API, what qualifies as a major bump should be a minor version bump until you want to turn the API into a stable version 1.0.0. However, since However, if you use |
No description provided.
The text was updated successfully, but these errors were encountered: