meanbee / magento2-serviceworker

Service Worker extension for Magento 2
MIT License
52 stars 27 forks source link

Use Json serializer to process custom strategies #11

Closed tgerulaitis closed 6 years ago

tgerulaitis commented 6 years ago

This matches serialization done by the \Magento\Config\Model\Config\Backend\Serialized\ArraySerialized class when saving the custom strategies in the admin area in Magento 2.2.

Fixes #9.

bobbyshaw commented 6 years ago

These changes look good.

Do we need to worry about other uses of serialize:

https://github.com/meanbee/magento2-serviceworker/blob/fdfbcdda9dec498ff448d4e2c06eb7b441de39a6/src/Setup/InstallData.php#L77 https://github.com/meanbee/magento2-serviceworker/blob/fdfbcdda9dec498ff448d4e2c06eb7b441de39a6/src/Setup/UpgradeData.php#L66 https://github.com/meanbee/magento2-serviceworker/blob/fdfbcdda9dec498ff448d4e2c06eb7b441de39a6/src/Setup/UpgradeData.php#L90

tgerulaitis commented 6 years ago

@bobbyshaw good catch on the UpgradeData, I missed that one. The InstallData usage is already in the PR though as far as I can see.

bobbyshaw commented 6 years ago

Ah yes, just UpgradeData. I thought the search would search the codebase at the commit of this PR but obviously, that's not true.

tgerulaitis commented 6 years ago

@bobbyshaw updated.