unleash-client-php
unleash-client-php copied to clipboard
Bug: validateResponse fails on impression_data
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
Our Unleash setup is the following: unleash-client-php: v2.5.283 unleash edge: v19.2.0 unleash server: 6.0.6
Currently we use Unleash Edge v18.0.1, it works as expected. We are trying to upgrade Edge to v19.2.0 which causes unleash-client-php (v2.5.283) to always return null in validateResponse()
. The reason is that Unleash Edge v19.2.0 returns the response with a bit different fields, in particular it returns impressionData
instead of impression_data
(Unleash Edge v18.0.1).
Unleash client is configure like this:
UnleashBuilder::create()
->withAppName(config('services.unleash.app.name'))
->withAppUrl(config('services.unleash.edge.url'))
->withInstanceId(config('services.unleash.edge.srv'))
->withProxy(config('services.unleash.edge.key'))
->withCacheTimeToLive(30)
->withStaleTtl(300)
->build()
While debugging it I can see that the request is sent to /api/frontend/features/<feature name>
To reproduce
- Invoke $unleash->isEnabled('some-feature-name');
- Expected to be true if the feature is enabled, but result is always false.
Sample code (optional)
No response
Version
v2.5.283
Expected behavior
Within validateResponse()
it must expect impressionData
instead of impression_data
, or both for backward compatibility.
Logs (optional)
No response
Additional context (optional)
No response