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

Include Constructor to be a part of CommandListInterface API, extend inline documentation #37901

Open
wants to merge 3 commits into
base: 2.4-develop
Choose a base branch
from

Conversation

engcom-Echo
Copy link
Contributor

Description (*)

This PR is copy of 29762. As in original PR target branch was 2.5-develop we have modified to point to 2.4-develop.

In my personal opinion using CommandListInterface is invalid way of adding new Commands to interface.
It is because Constructor is not a part of Interface (Service Contract), thus it is not "guaranteed" part of Interface.

Using CommandList is against Magento rules, thus it's implementation is not guaranteed and can change in backwards-incompatible way.

I'm extending the CommandList with @api to ensure developers that this class won't change backwards-incompatible way and this way - they can either add new classes using:

  • Argument injection to CommandList class
  • Plugin on getCommands on CommandListInterface.

I'd love to get your feedback there.

After discussion with @kandy I decided to add the __construct() to the API.

Answering the main concerns: https://3v4l.org/8ug8i
image

As it affects you (community) I need your 👍🏻 or comments to pass the change:
image

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

  1. ...
  2. ...

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)
  • All automated tests passed successfully (all builds are green)

Thanks

Resolved issues:

  1. resolves [Issue] Include Constructor to be a part of CommandListInterface API, extend inline documentation #31102: Include Constructor to be a part of CommandListInterface API, extend inline documentation

@m2-assistant
Copy link

m2-assistant bot commented Aug 21, 2023

Hi @engcom-Echo. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.

Add the comment under your pull request to deploy test or vanilla Magento instance:
  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@m2-community-project m2-community-project bot added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. labels Aug 21, 2023
@m2-community-project m2-community-project bot added this to Pending Review in Pull Requests Dashboard Aug 21, 2023
@engcom-Echo engcom-Echo added this to Pending Review in Community Dashboard Aug 21, 2023
@m2-community-project m2-community-project bot removed this from Pending Review in Community Dashboard Aug 21, 2023
@engcom-Echo engcom-Echo removed this from Pending Review in Pull Requests Dashboard Aug 21, 2023
@m2-community-project m2-community-project bot added this to Pending Review in Pull Requests Dashboard Aug 21, 2023
@engcom-Echo engcom-Echo added Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it Project: Community Picked PRs upvoted by the community Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Partner: Blue Acorn iCi partners-contribution Pull Request is created by Magento Partner and removed Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests labels Aug 21, 2023
@engcom-Echo engcom-Echo added this to Review in Progress in Community Dashboard Aug 21, 2023
@engcom-Echo engcom-Echo moved this from Review in Progress to Pending Review in Community Dashboard Aug 21, 2023
@m2-community-project m2-community-project bot removed this from Pending Review in Pull Requests Dashboard Aug 21, 2023
@engcom-Echo engcom-Echo changed the title Turn CommandList into @api to ensure backwards compatibility Include Constructor to be a part of CommandListInterface API, extend inline documentation Aug 21, 2023
@engcom-Echo
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

Copy link
Contributor

@engcom-Hotel engcom-Hotel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is the reference of the PR #29762, we have just changed the target branch to 2.4-develop from 2.5-develop.

Hence approving this PR to move forward.

Thanks

@engcom-Hotel
Copy link
Contributor

Hello @lbajsarowicz,

Thanks for the contribution!

✔️ QA Passed

As in this PR, the changes are related to making the lib/internal/Magento/Framework/Console/CommandList.php class a Public Interface by adding the @api annotation and adding the return type for getCommands() as array.

There is nothing to reproduce in this issue but it is a good to have feature. Hence moving this PR further process.

Due to SVC failure, moving this PR for approval.

Thanks

@engcom-Hotel
Copy link
Contributor

@magento run Functional Tests EE, Unit Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Hotel
Copy link
Contributor

Created an approval JIRA from approval of SVC failure.

@engcom-Hotel engcom-Hotel moved this from Ready for Testing to Pending Approval in Community Dashboard Aug 29, 2023
BeggiNN added a commit to BeggiNN/magento2 that referenced this pull request Sep 8, 2023
… Problem with the link

- Fix 'It's time to change your password' link in admin panel
@engcom-Hotel
Copy link
Contributor

@magento run Semantic Version Checker

Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Component: Console Partner: Blue Acorn iCi partners-contribution Pull Request is created by Magento Partner Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: pending approval Project: Community Picked PRs upvoted by the community Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
Community Dashboard
Pending Approval
Development

Successfully merging this pull request may close these issues.

[Issue] Include Constructor to be a part of CommandListInterface API, extend inline documentation
5 participants