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.