launchdarkly/php-server-sdk

DynamoDbFeatureRequester prefix/namespace inconsistent with NodeJS equivalent prefix:namespace.

MrAdamCook opened this issue · 2 comments

When attempting to implement our LD Relay (Daemon Mode) on both NodeJS and PHP I noticed that the way prefixes and namespaces are coalesced are inconsistent.
In our DynamoDB for the LD Relay the namespace values are saved as so "website:test:features". This has resulted in the NodeJS implementation working as expected, but the PHP implementation can't find the same flags.

PHP SDK:

$this->_prefix = ($prefix != null && $prefix != '') ? ($prefix . '/') : '';

NodeJS Server SDK:
return prefix ? (prefix + ':' + baseNamespace) : baseNamespace;
https://github.com/launchdarkly/node-server-sdk-dynamodb/blob/8ea55e68a057cfe4c7bb8de2aa5d9dd63b475f9d/dynamodb_feature_store.js#L174

Thanks for catching this. I verified that all of the other SDKs have the same behavior as Node, so PHP is the only one that needs to be fixed. We should have a patch release out shortly.

We've released version 3.7.3 with a fix for this.