Closed mickaelandrieu closed 6 years ago
We sometimes need PrestaShop code to act according to the version of the Shop.
This can be for addons API, some iframes or retrieve Localisation packs.
Currently, we end up with multiples helpers functions everywhere in the code.
It's time to extract a utility class, and declare it as a service so we can unit test it and rely on it everywhere.
WDYT?
Agree, service FTW!
Closed by https://github.com/PrestaShop/PrestaShop/pull/9174
We sometimes need PrestaShop code to act according to the version of the Shop.
This can be for addons API, some iframes or retrieve Localisation packs.
Currently, we end up with multiples helpers functions everywhere in the code.
It's time to extract a utility class, and declare it as a service so we can unit test it and rely on it everywhere.
WDYT?