Global registry class has been deprecated as of 2.3 due to potential for hard-to-detect coupling and as such use should be avoided or refactored to use mutable data providers or service classes.
Description
Removes usage of Registry::class in transaction sync and transaction backfill.
Refactors various disparate transaction sync and backfill methods to use added service class method TransactionService::sync()
Refactors backfill and sync controllers to emit events taxjar_salestax_backfill_transactions and taxjar_salestax_sync_transactions observed by TransactionBackfillObserver::class and TransactionSyncObserver::class respectively.
Refactors syncable order states which were previously hard-coded as class constants to an injectable configuration which can be modified by merchants in their own storefront's di.xml configuration file.
Refactors transaction backfill process in queue to use a ResourceModel consumer class.
Implements VitrualTypes for common Logger::class dependency injection to reduce boilerplate class configuration necessary in implementing class constructors.
Performance
Transaction sync refactor improve ease of maintenance and extends long-term maintainability with removal of deprecated methods. Additionally, refactor of backfill consumer process to remove chunking should will allow a SINGLE order sync process to be retriably-failed in queue as a single operation's data will not encompass multiple orders, some of which may have synced successfully.
Testing
WIP
Versions
[X] Magento 2.4
[ ] Magento 2.3
[X] Magento Open Source (formerly Magento 2 Community Edition)
Context
Global registry class has been deprecated as of 2.3 due to potential for hard-to-detect coupling and as such use should be avoided or refactored to use mutable data providers or service classes.
Description
Registry::class
in transaction sync and transaction backfill.TransactionService::sync()
taxjar_salestax_backfill_transactions
andtaxjar_salestax_sync_transactions
observed byTransactionBackfillObserver::class
andTransactionSyncObserver::class
respectively.di.xml
configuration file.ResourceModel
consumer class.Logger::class
dependency injection to reduce boilerplate class configuration necessary in implementing class constructors.Performance
Transaction sync refactor improve ease of maintenance and extends long-term maintainability with removal of deprecated methods. Additionally, refactor of backfill consumer process to remove chunking should will allow a SINGLE order sync process to be retriably-failed in queue as a single operation's data will not encompass multiple orders, some of which may have synced successfully.
Testing
WIP
Versions