-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
#29762
Include Constructor to be a part of CommandListInterface
API, extend inline documentation
#29762
Conversation
Hi @lbajsarowicz. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@api
to ensure backwards compatibility, clarify Command registrationCommandListInterface
API, extend inline documentation
@magento run all tests |
@shiftedreality - Tests are failing on this but no errors are appearing in the reports - eg the Unit Tests - can you advise? |
@magento run all tests |
@lbajsarowicz I saw the discussion in the Slack channel regarding this pull request, as far as I remember, @maghamed proposed to deprecate the interface and add @api annotation to the class itself, is that right? (I cannot add a screenshot of the original conversation since it was removed from the history) |
@lbajsarowicz @sidolov My reaction would be that marking the class as API is maybe actually the best approach of all. |
@magento run all tests |
b2f7641
to
4aec108
Compare
@magento run all tests |
@magento create issue |
@magento run all tests |
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. |
@sinhaparul, can this PR be moved to 2.4-develop release line? |
As the PR's milestone is 2.5, we will confirm this with @sinhaparul and proceed as per that. Till that time moving it to On Hold. Thank you! |
Hi @lbajsarowicz, Thank you for your contribution! Its a value added PR and we really want to take it further. Can you please update it towards 2.4-develop branch instead of 2.5-develop so that we can proceed further. Thank you! |
I'll handle it by August 1st |
Hi @lbajsarowicz, did you get chance to do the needful. |
Description (*)
Based on above comment we have created new PR targeting to 2.4-develop.
Link for the new PR: #37901
In my personal opinion usingCommandListInterface
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.
UsingCommandList
is against Magento rules, thus it's implementation is not guaranteed and can change in backwards-incompatible way.I'm extending theCommandList
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 toCommandList
classPlugin ongetCommands
onCommandListInterface
.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
As it affects you (community) I need your 👍🏻 or comments to pass the change:
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)
Thanks
Resolved issues:
CommandListInterface
API, extend inline documentation #31102: Include Constructor to be a part ofCommandListInterface
API, extend inline documentation