magento / meta-for-magento2

33 stars 19 forks source link

Meta Sales module TransactionUpdatePlugin: Object of class Taxjar\\SalesTax\\Model\\Transaction\\Order\\Interceptor could not be converted to string #51

Closed Jakub-Czech closed 1 month ago

Jakub-Czech commented 5 months ago

Preconditions (*)

  1. PHP 8.2
  2. Magento 2.4.6-p3
  3. meta/meta-for-magento2 v1.2.5
  4. taxjar/module-taxjar v2.2.0

Steps to reproduce (*)

  1. Trigger Sync Transaction of Taxjar (for example trigger sales_order_save_after event in Magento)

Expected result (*)

  1. Sync is successful and there is no error in exception.log

Actual result (*)

  1. Object of class Taxjar\\SalesTax\\Model\\Transaction\\Order\\Interceptor could not be converted to string

Source of the error: app/code/Meta/Sales/Plugin/TransactionUpdatePlugin.php::62 (https://github.com/magento/meta-for-magento2/blob/main/app/code/Meta/Sales/Plugin/TransactionUpdatePlugin.php)

The plugin tries to log in the object: $this->logger->debug($subject);

Only string or stringable object should be provided to the Meta\BusinessExtension\Logger\Logger::debug() which is inheritated from \Monolog\Logger::debug()

sol-loup commented 1 month ago

@Jakub-Czech, this should now be fixed

Jakub-Czech commented 1 month ago

@Jakub-Czech, this should now be fixed

I can confirm, it is fixed on newer version