You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every mentioned Task handles the unit conversion by itself (except TrucateTask which uses \Phing::convertShorthand), so I want to create SizeHelper class, the idea is to put all the conversion logic in a single place (the same way StringHelper is used to parse strings).
1024 is used as multiplier almost everywhere, except in size selector (which also supports 1000 as multiplier). Therefore -in order to apply KISS philosophy- I think the best is to only multiply bytes by 1024 and unsupport 1000. I know this is a breaking change, but that why major releases exist right?
What do you think? Should I continue with this idea and create a PR?
The text was updated successfully, but these errors were encountered:
Many tasks transforms Bytes to another unit, and from any unit to Bytes.
I have already mentioned this in #1420
Every mentioned Task handles the unit conversion by itself (except
TrucateTask
which uses\Phing::convertShorthand
), so I want to createSizeHelper
class, the idea is to put all the conversion logic in a single place (the same wayStringHelper
is used to parse strings).1024 is used as multiplier almost everywhere, except in
size selector
(which also supports 1000 as multiplier). Therefore -in order to apply KISS philosophy- I think the best is to only multiply bytes by 1024 and unsupport 1000. I know this is a breaking change, but that why major releases exist right?What do you think? Should I continue with this idea and create a PR?
The text was updated successfully, but these errors were encountered: