Skip to content

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

Merged
merged 5 commits into from
Sep 1, 2022

Conversation

loginesta
Copy link
Contributor

@loginesta loginesta commented Aug 31, 2022

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

@loginesta loginesta marked this pull request as ready for review August 31, 2022 16:09
@sivaschenko sivaschenko changed the title LYNX-32: Implement changes approved to @see tag in Dev guild Allow to skip see tag in annotation with specific deprecated comment Sep 1, 2022
@@ -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 &&
Copy link
Member

@sivaschenko sivaschenko Sep 1, 2022

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:

  1. @deprecated removed in versionwithout replacement
  2. @deprecated without replacementremoved in version

Copy link
Contributor Author

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

@sivaschenko
Copy link
Member

@magento import pr to magento-commerce/magento-coding-standard

@m2-github-services
Copy link
Contributor

@sivaschenko the Pull Request is successfully imported.

@magento-devops-reposync-svc magento-devops-reposync-svc merged commit 60dee90 into magento:develop Sep 1, 2022
@loginesta loginesta deleted the LYNX-32 branch September 1, 2022 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants