module-shipper icon indicating copy to clipboard operation
module-shipper copied to clipboard

Incorrect data type provided for freight_class attribute

Open xaevik opened this issue 4 years ago • 2 comments

We began experiencing an issue with order exports failing due to an implicit cast conversion deprecation being thrown. Upon investigation it was revealed that freight_class has an incorrect data type defined:

https://github.com/shipperhq/module-shipper/blob/321086b52e73302b1ec12dfd45b4d80532c4bdbd/src/Setup/Patch/Data/InstallFreightAttributes.php#L77-L78

It should be decimal not int as there are numerous freight classes (e.g., 77.5) that cannot be treated as integers.

Edit: string might be a better option if a numeric primitive is not really needed.

We have patched our environments in the interim until this issue is fixed in upstream.

xaevik avatar Nov 25 '22 14:11 xaevik

Hi @xaevik ,

Thank you for contacting us regarding this issue. Our development team will be looking into the freight_class data type.

Have a great day, Peter

shqsupport avatar Nov 25 '22 15:11 shqsupport

Hi @xaevik

Thanks for raising this. I've just released a new version of the extension which corrects this issue. Please update when you can.

wsajosh avatar Jan 30 '23 11:01 wsajosh