magento-semver icon indicating copy to clipboard operation
magento-semver copied to clipboard

Request: Add a ruleset reference

Open barbazul opened this issue 3 years ago • 4 comments

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

barbazul avatar Jul 27 '21 11:07 barbazul

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


m2-assistant[bot] avatar Jul 27 '21 11:07 m2-assistant[bot]

@magento I am working on this

barbazul avatar Oct 05 '21 20:10 barbazul

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

barbazul avatar Oct 05 '21 20:10 barbazul

Work in progress: https://github.com/barbazul/magento-semver/blob/documented-ruleset/docs/Ruleset.md

barbazul avatar Oct 06 '21 14:10 barbazul