Skip to content

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

Open
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #29762: Include Constructor to be a part of CommandListInterface API, extend inline documentation


Description (*)

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

Metadata

Metadata

Labels

Component: ConsolePriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: PR in progressSeverity: S4Affects aesthetics, professional look and feel, “quality” or “usability”.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itfeature request

Type

No type

Projects

Status

Pull Request in Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions