-
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
Do not hardcode product link types #9600
Conversation
Hey @kassner - thanks for the pull request. Makes sense. Can you please take a look at the Travis failures along with my comment on the constructor. |
@@ -90,14 +95,16 @@ public function __construct( | |||
StockDataFilter $stockFilter, | |||
\Magento\Catalog\Model\Product\Initialization\Helper\ProductLinks $productLinks, | |||
\Magento\Backend\Helper\Js $jsHelper, | |||
\Magento\Framework\Stdlib\DateTime\Filter\Date $dateFilter | |||
\Magento\Framework\Stdlib\DateTime\Filter\Date $dateFilter, | |||
\Magento\Catalog\Model\Product\LinkTypeProvider $linkTypeProvider |
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.
To introduce a new constructor argument as backwards compatible as possible can you please follow this pattern used here: https://github.com/magento/magento2/pull/9261/files#diff-e4882753f27f1777c744e441e2b4f9e2R103
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.
It seems to be a bit counter intuitive to use ObjectManager here when "the good practices" tell you to avoid touching it, specially for a class that is not part of the @api
.
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.
Indeed - but I guess it's currently better to be able to move forward without breaking things until a deprecation strategy is adopted.
If you could apply the changes you added to #9601 to here that be great, as develop gets processed before the backport. |
[EngCom] Public Pull Requests - MAGETWO-69573: Adding logo in media folder #9797 - MAGETWO-69555: Allow for referenceBlock to include template argument #9772 - MAGETWO-69540: Fix for #5897: getIdentities relies on uninitialized collection #9777 - MAGETWO-69533: [BUGFIX][6244] Fix Issue with code label display in cart checkout. #9721 - MAGETWO-69499: Update select.js #9475 - MAGETWO-69451: Replace Zend_Json in the configurable product block test #9753 - MAGETWO-69373: Customer with unique attribute can't be saved #7844 #9712 - MAGETWO-69369: Replace the direct usage of Zend_Json with a call to the Json Help class #9344 - MAGETWO-69085: Do not hardcode product link types #9600 - MAGETWO-69554: Patch to allow multiple filter_url_params to function #9723
@kassner thank you for your contribution to Magento 2 project |
When creating a new relation type, it is not possible to save it from the product edit form on admin, since
Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper
only iterates over the original link types (related
,crosssell
,upsell
) because they are hardcoded.