-
Notifications
You must be signed in to change notification settings - Fork 150
Magento Coding Standard Versioning Strategy #136
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
861a8fb
Magento Coding Standard Versioning Strategy
lenaorobei 969dbb5
Magento Coding Standard Versioning Strategy
lenaorobei 458aa55
Magento Coding Standard Versioning Strategy
lenaorobei e556317
Magento Coding Standard Versioning Strategy
lenaorobei 8a16753
Magento Coding Standard Versioning Strategy
lenaorobei 5971055
Magento Coding Standard Versioning Strategy
lenaorobei ede2e4c
Magento Coding Standard Versioning Strategy
lenaorobei File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
design-documents/testing/static/coding-standard-versioning.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # Magento Coding Standard Versioning | ||
|
|
||
| The purpose of this document is the defining versioning strategy for [Magento Coding Standard](https://github.com/magento/magento-coding-standard). | ||
|
|
||
| ## Summary | ||
|
|
||
| Version number should be increased with taking [Semantic Versioning](https://semver.org/) into account. | ||
| Given a version number `{major}`.`{minor}`.`{patch}`, following rules MUST be applied: | ||
|
|
||
| - `{patch}` version MUST be incremented when backward compatible changes (bug fixes) were made. | ||
|
|
||
| - `{minor}` version MUST be incremented when backward compatible changes (new features) were added. | ||
|
|
||
| - `{major}` version MUST be incremented when backward incompatible changes were made. | ||
|
|
||
| ### Terminology | ||
|
|
||
| **PHP CodeSniffer OOB rule** - rule that goes out-of-box with PHP CodeSniffer, the part of its package, the part of specific Coding Standard (PSR2, Squiz, etc). | ||
|
|
||
| **Magento rule** - Magento specific rule, the part of Magento Coding Standard, located under [Magento2/Sniffs/](https://github.com/magento/magento-coding-standard/tree/develop/Magento2/Sniffs) directory. | ||
|
|
||
| ### Versioning use cases | ||
|
|
||
| Following use cases are representing code change examples relatively to the version part that needs to be changed. | ||
|
|
||
| ### `{patch}` Release | ||
| - Bug fix to existing rule that prevents false-positive findings. | ||
| - Implementing unit tests for existing rules. | ||
|
|
||
| ### `{minor}` Release | ||
| - Removing PHP CodeSniffer OOB rule from Magento Coding Standard `ruleset.xml` file. | ||
| - Removing Magento rule from Magento Coding Standard (sniff code + `ruleset.xml`). | ||
| - Adding new `exclude-pattern` to the rule. | ||
| - Decreasing the `severity`. | ||
| - Changing `type` from `error` to `warning`. | ||
|
|
||
| In context of Coding Standard backward incompatible change occurs when rules became stricter and produce more findings. | ||
|
|
||
| ### `{major}` Release | ||
| - Adding new OOB rule to Magento Coding Standard `ruleset.xml` file. | ||
| - Implementing new Magento rule and adding it to `ruleset.xml` file. | ||
| - Changing the behaviour of existing Magento rule (extending functionality). | ||
| - Adding new `include-pattern` to the rule. | ||
| - Increasing the `severity`. | ||
| - Changing `type` from `warning` to `error`. | ||
| - Changing platform requirements. | ||
| - Changing namespace. | ||
|
|
||
| ## Release Line | ||
| Only one release line will be supported based on incremental approach depending on introduced changes. | ||
| General overview scheme: | ||
|
|
||
| ``` | ||
| 1.0.0 | ||
| | | ||
| 1.0.1 | ||
| | | ||
| 1.0.2 | ||
| | | ||
| |__1.1.0 | ||
| | | ||
| |__2.0.0 | ||
| | | ||
| |__2.0.1 | ||
| ``` | ||
|
|
||
| No `{patch}` and `{minor}` releases will be made to the previous `{major}` (1.0.0) version if the new `{major}` (2.0.0) version already exists. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
All this move to
major.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.
Moved.