0

I am having this issue after updating Magento from 2.3 to 2.3.2

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 /my/folder/public_html/app/code/Magento/QuoteGraphQl/Model/Cart/SetShippingAddressOnCart.php on line 20

I can't figure out even what it mean.

Is it from third-party module conflict or Magento native?

Any help please?

7
  • Why don't you install Magento via Composer?
    – zhartaunik
    Commented Oct 4, 2019 at 5:40
  • It means that the implementation of the interface has a different return type than the return type specified in the interface Commented Oct 4, 2019 at 5:41
  • @vitoriodachef how can I fix it please?
    – G. G.
    Commented Oct 4, 2019 at 7:11
  • I suppose you're trying to update from 2.3.0? You should try updating to 2.3.1 first and then to 2.3.2. Hopefully this helps. Commented Oct 4, 2019 at 7:18
  • @ArnoVandeCappelle I tried that already but from 2.3.1 to 2.3.2 I have same issue
    – G. G.
    Commented Oct 4, 2019 at 7:19

2 Answers 2

0

Where did you get the code from? This error should not happen. If you compare your /my/folder/public_html/app/code/Magento/QuoteGraphQl/Model/Cart/SetShippingAddressOnCart.php file with the M2 one on github you will see some difrence.

2
  • From github. I checked the file you mentioned but no luck. Now the error goes to line 15 of /my/folder/public_html/app/code/Magento/QuoteGraphQl/Model/Cart/SetShippingAddressOnCart.php
    – G. G.
    Commented Oct 4, 2019 at 7:44
  • 1
    I think you should and try to copy the github repo again (the 2.3 branch). Looks like some files have a different version. And also you should use Composer to avoid stuf like this. Commented Oct 4, 2019 at 7:54
3

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

1
  • Actually it needs to remove all these:/module-quote-graph-ql/Model/Cart/ExtractDataFromAddress.php - /module-quote-graph-ql/Model/Cart/ExtractDataFromCart.php - /module-quote-graph-ql/Model/Cart/GetCustomerAddress.php - /module-quote-graph-ql/Model/Cart/SetShippingAddressOnCart.php - /module-quote-graph-ql/Model/Cart/SetShippingMethodOnCart.php - /module-quote-graph-ql/Model/Resolver/Cart/CreateEmptyCart.php
    – G. G.
    Commented Oct 26, 2019 at 23:10

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.