After upgrade from magento 2.3.2 to 2.3.3 I get this error while Compilation:

Fatal error: Declaration of Magento\QuoteGraphQl\Model\Cart\SetShippingAddressOnCart::execute(Magento\Framework\GraphQl\Query\Resolver\ContextInterface $context, Magento\Quote\Api\Data\CartInterface $cart, array $shippingAddresses): void must be compatible with Magento\QuoteGraphQl\Model\Cart\SetShippingAddressesOnCartInterface::execute(Magento\GraphQl\Model\Query\ContextInterface $context, Magento\Quote\Api\Data\CartInterface $cart, array $shippingAddressesInput): void in /home/ttu52076/public_html/vendor/magento/module-quote-graph-ql/Model/Cart/SetShippingAddressOnCart.php on line 20

Any help?


2 Answers 2


Backup and delete the file /vendor/magento/module-quote-graph-ql/Model/Cart/SetShippingAddressOnCart.php

  • Thanks, perfect working for me... Nov 12, 2019 at 9:12

The error is pretty specific: the declaration of your class 'method must be compatible with the declaration of the class' method in the interface.

Do you have an override of Magento\QuoteGraphQl\Model\Cart\SetShippingAddressOnCart?

Because somewhere in 2.3, the interface for the execute method had an argument that changed from Magento\Framework\GraphQl\Query\Resolver\ContextInterface to Magento\GraphQl\Model\Query\ContextInterface (see this change). If you ever overrode that method, then you will need to update the $context argument to match the class specified in the interface.

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.