-
Notifications
You must be signed in to change notification settings - Fork 48
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
Article BC break part 1 #777
Conversation
} | ||
``` | ||
|
||
This is possible because the class is not [final](https://www.php.net/manual/en/language.oop5.final.php) so it is open for inheritance. It can be then considered that this class, and all of its protected and public properties and methods, are part of the API interface of this project. This means than any non-backwards compatible change to this class is a Breaking Change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that any non-backward compatible change to this class is a Breaking Change
Thanks for the proofreading @sowbiba ! |
Added some more this evening. I think the size is decent, and the "what about BC breaks in PrestaShop" is somewhere near 200 lines of code so I will keep the articles split in two. To finish this one, I believe I need
|
Co-authored-by: Pablo Borowicz <pablo.borowicz@prestashop.com>
|
||
If a project integrates this library as a dependency and wishes to extend this behavior, a very standard way to do so is to use [inheritance](https://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)). | ||
|
||
For example maybe project A needs a Money object with an identifier ? So it could create its own child class: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example maybe project A needs a Money object with an identifier ? So it could create its own child class: | |
For example maybe project A needs a Money object with an identifier? So it could create its own child class: |
|
||
BC breaks are a [hindrance](https://www.snoyman.com/blog/2018/04/stop-breaking-compatibility) for the users of a dependency as they require an upgrade of the code relying on it. So it seems getting rid of them, never introducing BC breaks would be a nice idea, right? | ||
|
||
Unfortunately BC breaks are necessary for software to evolve. Maintaining backward compatibility strongly limits the options of the dependency maintainers and can stand in the way of necessary evolutions. This is why they are needed and why they are introduded in new major releases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately BC breaks are necessary for software to evolve. Maintaining backward compatibility strongly limits the options of the dependency maintainers and can stand in the way of necessary evolutions. This is why they are needed and why they are introduded in new major releases. | |
Unfortunately BC breaks are necessary for software to evolve. Maintaining backward compatibility strongly limits the options of the dependency maintainers and can stand in the way of necessary evolutions. This is why they are needed and why they are introduced in new major releases. |
Closing after 1 year. Not needed anymore. |
This article is the 1st part of a big article explaining what exactly are Backward Compatibility Breaks also known as Breaking Changes or BC breaks.
This article
I am not yet sure whether I should append to this part 1 the next part "BC breaks come in many shapes on PrestaShop project, how do we deal with them" or it should be another article.
This is WIP, I need to
Fixes #704 partially