algolia / algoliasearch-client-php

⚡️ A fully-featured and blazing-fast PHP API client to interact with Algolia.
https://www.algolia.com/doc/api-client/php/getting-started/
MIT License
671 stars 116 forks source link

Empty decompoundedAttributes on payload throws error #731

Open mrahman3177 opened 3 months ago

mrahman3177 commented 3 months ago

Description

I added a new Decompounded attribute ({"da":["name"]}) and removed it from Algolia dashboard. Then when I pulled online attributes using PHP connector, an empty decompoundedAttributes returned. After merging my local configs when I tried to save it, it throws the following error. "nvalid array syntax in decompoundedAttributes attribute near line:1 column:354"

We tested with 4.x.x PHP Client and we couldn't reproduce it in there.

Steps To Reproduce

  1. Add a new decompounded attribute in Algolia dashboard
  2. Now delete that attribute from Algolia dashboard
  3. Pull online attributes
  4. Now try to save those attributes again

Actual result

Throws "nvalid array syntax in decompoundedAttributes attribute near line:1 column:354" error

Expected result

Should save config without any error.