Repository navigation
Conversation
Catalog\Block\Product\Context and Catalog\Helper\Product\Compare took Magento\Wishlist\Helper\Data as a typed constructor argument, and five Catalog and CatalogWidget templates called that helper directly. Without module-wishlist, setup:di:compile fails for Magento_Catalog. Add Magento\Catalog\Helper\Wishlist\AddToWishlistInterface with the two methods Catalog uses (isAllow() and getAddParams()). Catalog binds it to NullAddToWishlist. Wishlist\Helper\Data implements it and Magento_Wishlist binds the interface to that helper, so with Wishlist installed Context::getWishlistHelper() still returns the wishlist helper itself. Code relying on its other methods keeps working. The templates now call $block->isAddToWishlistAllowed(), a new AbstractProduct method, and $block->getAddToWishlistParams(). The legacy product/listing.phtml now also checks isAddToWishlistAllowed() before rendering its "Add to Wish List" link, like the other templates. Catalog's and CatalogWidget's composer.json drop magento/module-wishlist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 1, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 of 5 tasks
pingiun
marked this pull request as draft
November 1, 2026 19:34
This was referenced Nov 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description (*)
Catalog\Block\Product\ContextandCatalog\Helper\Product\ComparetakeWishlist\Helper\Dataas a typed constructor argument, and five Catalog/CatalogWidget templates call that helper. Without Wishlist,setup:di:compilefails. Part of the series that makes Magento_Wishlist removable (#286, #287).Catalog\Helper\Wishlist\AddToWishlistInterface(isAllow(),getAddParams()). Catalog binds it to a null implementation.Wishlist\Helper\Dataimplements the interface and Wishlist binds the interface to it, so callers still get the wish list helper itself.$block->isAddToWishlistAllowed()(new onAbstractProduct) andgetAddToWishlistParams().composer.json.Related Pull Requests
#395, #397, #398, #399, #400 (which builds on this one)
Manual testing scenarios (*)
Contribution checklist (*)
🤖 Generated with Claude Code