-
Notifications
You must be signed in to change notification settings - Fork 160
Allow to skip see tag in annotation with specific deprecated comment #419
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
Allow to skip see tag in annotation with specific deprecated comment #419
Conversation
@@ -123,6 +126,10 @@ public function hasDeprecatedWellFormatted($commentStartPtr, $tokens) | |||
} | |||
$seePtr = $this->getTagPosition('@see', $commentStartPtr, $tokens); | |||
if ($seePtr === -1) { | |||
if (stripos($tokens[$deprecatedPtr + 2]['content'], self::REMOVED_IN_VERSION, 0) !== false && |
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.
Expected:
@deprecated This method will be removed in version 2.x.x without replacement
Actual:
- @deprecated removed in versionwithout replacement
- @deprecated without replacementremoved in version
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.
Thanks for the useful comment! I've done a refactor to use preg_match instead
@magento import pr to magento-commerce/magento-coding-standard |
@sivaschenko the Pull Request is successfully imported. |
For deprecated code with no replacement as that functionality is not provided anymore, use This method will be removed in version 2.x.x without replacement as keyword phrase in @deprecated description in addition to deprecation motif. That keyword phrase will help us identify @deprecated annotations that do not need @see.
https://github.com/magento-commerce/development-guild/issues/191
https://jira.corp.adobe.com/browse/LYNX-32