EaDesgin / magento2-pdf-generator2

Invoice PDF Generator For Magento 2
https://www.eadesign.ro/magento2-invoice-credit-memo-shipping-and-product-pdf-generator-pro.html
Apache License 2.0
67 stars 60 forks source link

Fix TransportBuilder for Magento2.3.5 compatibility #106

Open thisisandrew opened 3 years ago

thisisandrew commented 3 years ago

Remove di for Message preference, update TransportBuilder to handle attachment, update SenderBuilder to use TransportBuilder

Module latest 12.10 allows PHP7.3 but dev dependencies for testing require <7.3 so no test for this PR. Fix the dev dependencies in the latest version and we can have tests here.

lingwooc commented 3 years ago

In magento 2.3.6 The sales_send_order_invoice_emails cron job throws an exception with this PR.

Run SalesInvoiceSendEmailsCron::execute 

  Cron-job "sales_send_order_invoice_emails" threw exception ReflectionException                                                                               

In ClassReader.php line 26:

  Class Eadesigndev\Pdfgenerator\Model\Email\SenderBuilder does not exist  

Which is true, because this patch replaces it with a TransportBuilder instance.