Skip to content
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

[Issue] [PHPMD] Add phpmd rule with ignoring of unused required parameters in the plugins #37914

Closed
5 tasks
m2-assistant bot opened this issue Aug 24, 2023 · 2 comments · Fixed by #33918
Closed
5 tasks
Assignees
Labels
Area: Framework Component: Catalog Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P3 May be fixed according to the position in the backlog. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”.

Comments

@m2-assistant
Copy link

m2-assistant bot commented Aug 24, 2023

This issue is automatically created based on existing pull request: #33918: [PHPMD] Add phpmd rule with ignoring of unused required parameters in the plugins


Description (*)

This PR improve phpmd UnusedFormalParameter rule with ignoring of required unused parameters in the plugins.

  • around and after plugins has 2 required params $subject and $proceed (or $result for after plugin).
  • before plugin has 1 required param $subject.

This PR override standard UnusedFormalParameter rule and allow don't use @SuppressWarnings(PHPMD.UnusedFormalParameter) in the plugins.

Related Pull Requests

Fixed Issues (if relevant)

Manual testing scenarios (*)

  1. Configure phpmd
  2. Remove @SuppressWarnings(PHPMD.UnusedFormalParameter) from some plugin
  3. Add PluginInterface implementation into the class
  4. Run phpmd. Expected no UnusedFormalParameter errors

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)
@m2-assistant m2-assistant bot added Component: Catalog Priority: P3 May be fixed according to the position in the backlog. Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. labels Aug 24, 2023
@engcom-Echo engcom-Echo added Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: Framework Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Aug 24, 2023
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-9367 is successfully created for this GitHub issue.

@m2-assistant
Copy link
Author

m2-assistant bot commented Aug 24, 2023

✅ Confirmed by @engcom-Echo. Thank you for verifying the issue.
Issue Available: @engcom-Echo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Framework Component: Catalog Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P3 May be fixed according to the position in the backlog. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants