Skip to content

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”. Progress: pending review labels Aug 21, 2023
@engcom-Echo engcom-Echo added Component: Console 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 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-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

engcom-Dash commented May 14, 2025

Hello @lbajsarowicz ,

Thanks for the contribution!

✔️ QA Passed

As mentioned over here #37901 (comment) changes are related to making the lib/internal/Magento/Framework/Console/CommandList.php class a Public Interface by adding the @api annotation.

Due to SVC failure, moving this PR for approval.

Thanks!

@engcom-Dash engcom-Dash moved this from Testing in Progress to Extended testing (optional) in Community Dashboard May 14, 2025
@engcom-Dash
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests EE, Semantic Version Checker

@engcom-Dash engcom-Dash moved this from Extended testing (optional) to To Approve in Community Dashboard May 15, 2025
@engcom-Dash
Copy link
Contributor

engcom-Dash commented May 15, 2025

After removing the strict return type of the public method we have avoided the Major SVC failure. For MINOR SVC failure Updated the JIRA AC-9408 with the recent SVC failure details and asked for the approval.

Once we get all the required approvals we will proceed further with this PR.

For now moving this PR in Pending Approval.

@engcom-Dash
Copy link
Contributor

Since JIRA AC-9408 has been approved, moving this PR from Pending Approval to Extended Testing.

@engcom-Dash engcom-Dash moved this from Pending Approval to Extended testing (optional) in Community Dashboard Sep 10, 2025
@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

@magento run Unit Tests

@engcom-Dash
Copy link
Contributor

The consistent failures in Functional B2B are known issues and JIRA is open for the same. The other failures are inconsistent and flaky. They neither part of the PR nor failing because of the PR changes.

Build 1
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/37901/8fc407449b0b6c10536a6b101a236181/Functional/allure-report-b2b/index.html#categories/8fb3a91ba5aaf9de24cc8a92edc82b5d
image

Build 2
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/37901/b7f5b143ef3997e24fcc0bcbb7e20a54/Functional/allure-report-b2b/index.html#categories/bdbf199525818fae7a8651db9eafe741
image

Known Issue
AdminVerifyBehaviorOfDefaultStatusForProcessingStateTest ACQE-8689
StorefrontCheckTaxAddingValidVATIdTest ACQE-8701
StorefrontCreatePurchaseOrderFromNegotiableQuoteTest ACQE-8645

The consistent failures in Functional EE are known issues and JIRA is open for the same. The other failures are inconsistent and flaky. They neither part of the PR nor failing because of the PR changes.

Build 1
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/37901/ce1e2e73a8c596d90d859fa9c180bef5/Functional/allure-report-ee/index.html#categories/8fb3a91ba5aaf9de24cc8a92edc82b5d
image

Build 2
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/37901/8f65eab18a9a27290a759f2063aba77b/Functional/allure-report-ee/index.html#categories/8fb3a91ba5aaf9de24cc8a92edc82b5d
image

Known Issue

AdminMassOrdersReleasePendingOrderTest ACQE-8641
AdminVerifyBehaviorOfDefaultStatusForProcessingStateTest ACQE-8689
StorefrontCheckTaxAddingValidVATIdTest ACQE-8701

The consistent failures in Functional CE are known issues and JIRA is open for the same. The other failures are inconsistent and flaky. They neither part of the PR nor failing because of the PR changes.

Build1
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/37901/e34915e789786383704a3408b24d6aad/Functional/allure-report-ce/index.html#categories/d52f54183a27cd1914dd108203055fcd/75b28b3bb764b96a/
image

Build 2
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/37901/296cf4bdda3d0ca7e74989d2234ca295/Functional/allure-report-ce/index.html#categories/bdbf199525818fae7a8651db9eafe741
image

Known Issue
AdminVerifyBehaviorOfDefaultStatusForProcessingStateTest ACQE-8689
StorefrontCheckTaxAddingValidVATIdTest ACQE-8701

SVC Failure
Build 1
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/37901/afbccb62be8a8fee97544b5c80734eb2/SemanticVersionChecker/report-magento2.html
image

Build 2
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/37901/5141cce77d726d2bd6683123983fe9ef/SemanticVersionChecker/report-magento2.html
image

SVC Jira Approved
JIRA AC-9408

Hence, Moving this PR to Merge In Progress

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: deployment queue 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

Status: Merge in Progress

Development

Successfully merging this pull request may close these issues.

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

7 participants