v1.3.1 How to fix the compile issue on M2.4.2?

Created by Rosa Truong, Modified on Fri, 12 Mar, 2021 at 3:19 PM by Rosa Truong

Issue:


We are getting error during compilation as below in Magento 2.4.2 version with module version 1.3.1. It seems arguments are incompatible with the class used. We are using this via composer installation

php bin/magento setup:di:compile

Compilation was started.

Interception cache generation... 6/9 [==================>---------]  66% 44 secs 614.0 MiBErrors during compilation:

Bss\OrderDeliveryDate\Model\Plugin\Sales\Order\Pdf\Shipment

Incompatible argument type: Required type: \Magento\Store\Model\App\Emulation. Actual type: \Magento\Framework\Locale\ResolverInterface; File:

/vendor/bsscommerce/order-delivery-date/Model/Plugin/Sales/Order/Pdf/Shipment.php Bss\OrderDeliveryDate\Model\Plugin\Sales\Order\Pdf\Invoice

Incompatible argument type: Required type: \Magento\Store\Model\App\Emulation. Actual type: \Magento\Framework\Locale\ResolverInterface; File:

/vendor/bsscommerce/order-delivery-date/Model/Plugin/Sales/Order/Pdf/Invoice.php Bss\OrderDeliveryDate\Model\Plugin\Sales\Order\Pdf\Creditmemo

Incompatible argument type: Required type: \Magento\Store\Model\App\Emulation. Actual type: \Magento\Framework\Locale\ResolverInterface; File:

/vendor/bsscommerce/order-delivery-date/Model/Plugin/Sales/Order/Pdf/Creditmemo.phpTotal Errors Count: 3In Log.php line 92:  Error during compilation

So please provide a solution or any patch available for this issue


Solution: 


The issues happen due to the incompatible with M2.4.2

To solve the issues, please check and apply the hot-fix as the attachments.

vendor/bsscommerce/order-delivery-date/Model/Plugin/Sales/Order/Pdf/Shipment.php

/vendor/bsscommerce/order-delivery-date/Model/Plugin/Sales/Order/Pdf/Invoice.php

vendor/bsscommerce/order-delivery-date/Model/Plugin/Sales/Order/Pdf/Creditmemo.php


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

We'd like to help.


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 at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article