Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Tax
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Sep 2018 at 12:24 UTC
Updated:
25 Dec 2019 at 14:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mirom commentedComment #4
mirom commentedFixing fails from previous patch.
Comment #5
bojanz commentedThis needs tests. Let's not define default weights on the existing plugins, there is no need. The shipping plugin can define its own weight that's higher than 0.
Every config entity already has a sort() method, we should override it on the TaxType class, and call it from there.
We also don't use camel case in code.
Comment #6
bojanz commentedHere's an initial cleanup. Still needs tests.
Comment #7
bojanz commented$entities should be $this->taxTypes.
Comment #8
johnjw59 commentedIncluded an updated patch with the switch to $this->taxTypes as pointed out in #7. Also, I think we do need to set defaults in TaxTypeManager. I was getting errors that "weight" could not be found without that default set.
Comment #9
bojanz commentedWe don't need $defaults, the warnings disappear when you clear cache.
Here's the final patch. Added a getter for the weight, and a test for it. We don't have plugins with different weights, so I can't expand OrderIntegration test to cover that right now.
Comment #11
bojanz commentedCommited. Just in time for 2.16 :)