-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Fix incorrect return type for getOptionByCode method #39389
base: 2.4-develop
Are you sure you want to change the base?
Fix incorrect return type for getOptionByCode method #39389
Conversation
Hi @ihor-sviziev. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
@magento create issue |
Moving this PR to review, as bot moved it to On Hold. |
@magento run all tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @ihor-sviziev,
Thanks for the contribution!
The PR changes seem good to us. But please resolve the static test failure.
Thanks
Fix static tests failure
@magento run Static Tests |
@engcom-Hotel fixed |
As per this, moving it to review again. |
@magento run all tests |
@magento run all tests |
Manual testing is not required here, as this PR is updating return type of a method in doc block . Currently the build is failing hence moving it to Extended Testing. |
@magento run Functional Tests B2B, Functional Tests CE, Semantic Version Checker, WebAPI Tests |
@magento run Functional Tests EE |
Raised internal approval JIRA for the SVC failure. Moving this PR to Pending Approval now. We will proceed ahead on this once will get all the required approvals. ![]() |
Description (*)
I've noticed that
\Magento\Catalog\Model\Product\Configuration\Item\ItemInterface::getOptionByCode
return type is defined as object all the time:magento2/app/code/Magento/Catalog/Model/Product/Configuration/Item/ItemInterface.php
Lines 24 to 30 in b2ce2a3
However, this interface implements 3 classes, and each of them returns object OR null, so it's a bug in the method definition on interface:
magento2/app/code/Magento/Quote/Model/Quote/Address/Item.php
Lines 200 to 210 in 6729b6e
magento2/app/code/Magento/Quote/Model/Quote/Item.php
Lines 726 to 738 in 2afe92f
magento2/app/code/Magento/Wishlist/Model/Item.php
Lines 697 to 709 in 795b2c6
This pull request fixes incorrect phpdoc block, which leads to confusion, which leads to bugs during development
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)
Resolved issues: