How to fix the di:compile issue when PHP version under 7.2?

Created by Rosa Truong, Modified on Tue, 30 Nov 2021 at 03:24 PM by Rosa Truong

Issue:


We are using version 1.1.7 on M2.3.5 with PHP 7.1 but when we compile out terminal show error as below 

Fatal error: Declaration of Bss\Paymentshipping\Model\ResourceModel\PaymentshippingRepository::save($paymentShipping) must be compatible with Bss\Paymentshipping\Api\PaymentshippingRepositoryInterface::save(array $paymentShipping) in /home/stagreatvalue/public_html/app/code/Bss/Paymentshipping/Model/ResourceModel/PaymentshippingRepository.php on line 31

Could you please check and fix it?


Solution


The issue happens due to the file Bss\Paymentshipping\Model\ResourceModel\PaymentshippingRepository.php does not work with PHP < 7.1 on the site.

Hence, we have fixed and changed this file as this screenshot


 Please check and apply the file on the site.


If you need any help, please feel free to contact us.

We're happy to support you.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article