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.
Learn more about us
BSS Commerce is a full-service ecommerce agency with 14+ years of experience, supporting 75,000+ customers worldwide. As an Adobe Commerce Solution Bronze Partner and Select Magento Extensions Builder, we deliver trusted end-to-end solutions.
Our core strength is Magento, with 150+ extensions designed to enhance store performance and drive growth. With deep expertise from years of working on Magento websites, we deliver scalable, high-impact solutions backed by strong client trust.
Discover our extensions: https://bsscommerce.com/magento-2-extensions.html
Besides, we also offer you our top tier extensions:
- BSS Commerce’s Magento 2 B2B Extension is a trusted solution for managing complex B2B operations with ease and flexibility.
- BSS Commerce’s Magento 2 SEO Extension is a reliable tool to strengthen your SEO strategy and drive sustainable growth.
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
Feedback sent
We appreciate your effort and will try to fix the article