diff --git a/src/FeedContext/Google/Shopping/ProductItemContext.php b/src/FeedContext/Google/Shopping/ProductItemContext.php index 3f2d7b6..5944330 100644 --- a/src/FeedContext/Google/Shopping/ProductItemContext.php +++ b/src/FeedContext/Google/Shopping/ProductItemContext.php @@ -16,6 +16,7 @@ use Setono\SyliusFeedPlugin\Model\BrandAwareInterface; use Setono\SyliusFeedPlugin\Model\ColorAwareInterface; use Setono\SyliusFeedPlugin\Model\ConditionAwareInterface; +use Setono\SyliusFeedPlugin\Model\FeedInterface; use Setono\SyliusFeedPlugin\Model\GtinAwareInterface; use Setono\SyliusFeedPlugin\Model\LocalizedBrandAwareInterface; use Setono\SyliusFeedPlugin\Model\LocalizedColorAwareInterface; @@ -49,7 +50,7 @@ public function __construct( ) { } - public function getContextList(object $product, ChannelInterface $channel, LocaleInterface $locale): ContextListInterface + public function getContextList(object $product, ChannelInterface $channel, LocaleInterface $locale, FeedInterface $feed = null): ContextListInterface { if (!$product instanceof ProductInterface) { throw new InvalidArgumentException(sprintf( diff --git a/src/Message/Handler/GenerateBatchHandler.php b/src/Message/Handler/GenerateBatchHandler.php index 3275e3d..8799f45 100644 --- a/src/Message/Handler/GenerateBatchHandler.php +++ b/src/Message/Handler/GenerateBatchHandler.php @@ -116,7 +116,8 @@ public function __invoke(GenerateBatch $message): void foreach ($items as $item) { try { - $contextList = $itemContext->getContextList($item, $channel, $locale); + /** @phpstan-ignore arguments.count */ + $contextList = $itemContext->getContextList($item, $channel, $locale, $feed); /** @var array|object $context */ foreach ($contextList as $context) {