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
Versions
[X] Magento 2.4
[ ] Magento 2.3
[X] Magento Open Source (formerly Magento 2 Community Edition)
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 classesRemoves 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 standardsPerformance
No impact.
Testing
Validated updated frontend model in debug settings
Versions