-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Mark breaking change more clearly #3792
Conversation
Thank you for the suggestion. I actually just merged something equivalent with PR #3787, so this is no longer needed. Closing. |
This PR is actually based on the result of merging the other PR. |
Everything listed under "Changed" is a breaking change. We don't usually have a "Breaking Change" section. The pending release has one because the change to leverage native typing after eliminating Php7.4 was extremely broad (most breaking changes are narrow in scope). Before that, there has been no Breaking Change section since the very first release of PhpSpreadsheet in 2017; we have consistently used Changed ever since. |
Ah, that is very surprising, given the top of the changelog states that "this project adheres to Semantic Versioning" According to the Semantic Versioning conventions, any breaking change requires incrementing the major version, while minor version changes must be backwards compatible. Would it be fair to say that this project doesn't actually adhere to Semantic Versioning? |
Or to add a clarification like "This project mostly adheres to Semantic Versioning, although we don't increment the major version for some breaking changes that are narrow in scope"? |
Interesting observation. Not my area of expertise. I want to defer to my colleagues, but I wouldn't mind continuing the discussion with you for a bit. For the change in question, it was not even reported as a problem for some time. It was a mistake to not document the change properly at the time (and, arguably, to change the constant in the first place), but, having made the mistake, I don't know what else we can do other than document it properly for both the release in which it happened and the pending release. We can't, or at least won't, retroactively make it a major release. So, let's look at some other things in the Changed section.
|
I agree - what's been released has been released. It is also true that the difference between a breaking change and a non-breaking one can be vague in many cases.
In my opinion, this definitely calls for a new major version. In the "Node.js universe" that I have more experience with, dropping support for older Node.js versions is almost always considered a breaking change that requires a major version increase. Even if the Node.js version in question is very old and hasn't been in active support for years.
I'm not familiar enough with this change, but in general, my gut feeling says that:
This seems like a grey area. I can imagine it might mess up someone's layout, but it doesn't sound "catastrophic enough" for a major release 😄 The number format difference, however, changed our generated spreadsheets from displaying more accurate values to less accurate values (e.g. rounding € 5.32 to € 5), which caused quite a bit of confusion and problems for accountants using the system. If it had been known before the release, I would have considered it a breaking change. |
I don't know how to embed new comments in a conversation like you did with your last reply. Please enlighten me. That being so, I have only one additional comment for now, expanding on the RLM change. The behavior change would have come not with any release of PhpSpreadsheet, nor even with a specific release of Php. It was entirely dependent on the release of ICU which was incorporated in the Php release. So it could be triggered with a new point release of Php, or even running in a different environment with the same point release. I noticed it because I was getting different results between Windows and Linux. |
@MarkBaker @PowerKiKi I've taken this discussion about as far as I can, which is, hopefully, far enough to get you involved. Should we be changing how we number our releases? Should we instead offer some sort of clarification about "breaking changes" at the top of the change log? |
Here is more info on formatting GitHub comments. The quote button is also on the comment editor toolbar, after Bold and Italic.
I see. Even though the change is an improvement in most cases, I can imagine scenarios where someone has been using PhpSpreadsheet in an environment where the ICU doesn't change and then a minor version upgrade of PhpSpreadsheet breaks their application (by using a different number format than before, I assume). So I guess a good baseline for deciding is imagining the worst-ish case scenario that a change might unexpectedly have for someone and figure if you'd want to protect them against that through a major version bump. Of course, the worst case scenario might involve a person unaware of the semver convention who blindly updates to a new major version without testing, but we have to draw the line somewhere 😄 |
I'll have to side with @mjomble in general. We should definitely release major version when something breaks. This will be the case for the next version because we introduce typing that will break inheriting classes. In the future we should also be more careful as to not release a breaking change too often or in patch releases. And However, in PHP ecosystem, dropping the support for a PHP version is absolutely not a breaking change. Composer strongly enforce this constraint. If you use composer correctly and you have an old PHP, you just won't get the latest version of the library. But dropping a PHP version will never requires you to update your code, so it's not a breaking change. |
This is:
Checklist:
Why this change is needed?
This change resulted in production code breaking in one of my projects. Marking it more clearly might help others avoid this problem.