taxjar / taxjar-magento2-extension

Magento 2 Sales Tax Extension by TaxJar
http://www.taxjar.com/guides/integrations/magento2/
Open Software License 3.0
22 stars 29 forks source link

XCON 169: Refactor abstract class inheritance #335

Closed sethobey closed 2 years ago

sethobey commented 2 years ago

Context

Adobe Commerce/Magento best practices for extension development recommend favoring composition over inheritance. Some custom traits and abstract classes were previously implemented and should be removed or abstracted in some other way.

Description

Removes CachesConfiguration trait Instead, we will access the cache in Block class constructor from the current $context.

Removes AbstractTaxClassSelect block This functionality could instead be implemented in child classes

Removes unnecessary frontend model Connected It appears this file did something in M1, but the functionality is no longer present in M2.

Other changes Refactors Block/AddressValidation, updates copyright date and adds doc blocks as necessary for code standards

Performance

No impact.

Testing

Validated updated frontend model in debug settings

image

Versions