• We are trying to upgrade a Magento 2.1.9 site to Magento 2.2.2 Getting Error .. " Can anyone help me "

Upgrade Commands - composer require magento/product-community-edition 2.2.2 --no-update Then execute this all commands - composer update - rm -rf var/di var/generation - php bin/magento setup:upgrade - php bin/magento setup:di:compile

Error Image message on this link enter link description here

[Exception] Warning: Declaration of Bss\MultiStoreViewPricingCatalogRule\Model\ResourceModel\RuleAdmin::getRulePrices(DateTime $date, $websiteId, $customerGroupId, $productIds, $storeId = NULL) should be compatible w
ith Magento\CatalogRule\Model\ResourceModel\Rule::getRulePrices(DateTimeInterface $date, $websiteId, $customerGroupId, $productIds) in /var/www/html/app/code/Bss/MultiStoreViewPricingCatalogRule/Model/Res
ourceModel/RuleAdmin.php on line 106

1 Answer 1


If you check the method declaration here (2.1.9) and here (2.2.2), you will see the difference that the older version uses \DateTime type for parameter named $date, but the newer version uses \DateTimeInterface type.

You have 2 options to fix the error:

  1. upgrade your Multiple Store View Pricing module
  2. edit the method declaration from Bss\MultiStoreViewPricingCatalogRule\Model\ResourceModel\RuleAdmin::getRulePrices(\DateTime $date, $websiteId, $customerGroupId, $productIds, $storeId = NULL) to Bss\MultiStoreViewPricingCatalogRule\Model\ResourceModel\RuleAdmin::getRulePrices(\DateTimeInterface $date, $websiteId, $customerGroupId, $productIds)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.