Open
Description
This issue is automatically created based on existing pull request: #39389: Fix incorrect return type for getOptionByCode method
Description (*)
I've noticed that \Magento\Catalog\Model\Product\Configuration\Item\ItemInterface::getOptionByCode
return type is defined as object all the time:
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)
- Fixes magento/magento2#<issue_number>
Manual testing scenarios (*)
- ...
- ...
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)
- README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- All automated tests passed successfully (all builds are green)
Metadata
Metadata
Assignees
Labels
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchIssue related to Developer Experience and needs help with Triage to Confirm or Reject it