magento-semver
magento-semver copied to clipboard
Request: Add a ruleset reference
PHP Semver Checker has one https://github.com/tomzx/php-semver-checker/blob/master/docs/Ruleset.md and is pretty handy for quickly checking before making a change.
In most cases where there is already a version constraint set it is very inconvenient to have to make the change, then run the tool, then have to rollback parts of the work done to avoid breaking changes.
The ruleset could be a simple md file referencing the original ruleset, specifying the few overrides and explaining all the custom Magento 2 rules being added
Hi @barbazul. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.
Please, add a comment to assign the issue: @magento I am working on this
- Join Magento Community Engineering Slack and ask your questions in #github channel.
@magento I am working on this
As I am currently working on documenting a Ruleset.md file I detected some issues .
I have found a discrepancy in code format. Some rules follow the format MXYZ
like M123
and some others follow M0XYZ
like M0123
which leads to some pseudo-collisions like
Code | Level | Rule |
---|---|---|
M0122 | MAJOR | Extends has been removed. |
M122 | PATCH | [private] Method return typing changed. |
Some other cases actually collide. So far the only example I have found is rule M108 which is duplicated both classes refer to the same situation (a DB foreign key being dropped/removed). I am documenting these as 2 rows like the following:
Code | Level | Rule |
---|---|---|
M108 | MAJOR | Foreign key removed from declaration but it may have had business logic in onDelete statement |
M108 | MAJOR | Foreign key was removed |
Work in progress: https://github.com/barbazul/magento-semver/blob/documented-ruleset/docs/Ruleset.md