shipperhq / module-shipper

Base ShipperHQ Repo
Open Software License 3.0
21 stars 20 forks source link

Incorrect data type provided for freight_class attribute #127

Closed xaevik closed 1 year ago

xaevik commented 1 year ago

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.

shqsupport commented 1 year ago

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

wsajosh commented 1 year ago

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.