feat(ForcedDecisions): add forced-decisions APIs to OptimizelyUserContext#233
Merged
msohailhussain merged 28 commits intomasterfrom Nov 4, 2021
Merged
feat(ForcedDecisions): add forced-decisions APIs to OptimizelyUserContext#233msohailhussain merged 28 commits intomasterfrom
msohailhussain merged 28 commits intomasterfrom
Conversation
isFeatureEnabled
getFeatureVariable{Type}
getAllFeatureVariables
getEnabledFeatures
ozayr-zaviar
reviewed
Oct 6, 2021
ozayr-zaviar
reviewed
Oct 6, 2021
ozayr-zaviar
reviewed
Oct 6, 2021
ozayr-zaviar
reviewed
Oct 6, 2021
ozayr-zaviar
reviewed
Oct 6, 2021
ozayr-zaviar
reviewed
Oct 6, 2021
ozayr-zaviar
reviewed
Oct 6, 2021
ozayr-zaviar
reviewed
Oct 6, 2021
ozayr-zaviar
reviewed
Oct 6, 2021
jaeopt
reviewed
Oct 12, 2021
jaeopt
requested changes
Oct 12, 2021
Contributor
jaeopt
left a comment
There was a problem hiding this comment.
All changes look good! A couple of more changes suggested.
…ations are getting removed
dustin-sier
reviewed
Nov 2, 2021
| $flagRules = $this->getAllRulesForFlag($flag); | ||
|
|
||
| foreach ($flagRules as $rule) { | ||
| $flagVariations = array_merge($flagVariations, array_filter(array_values($rule->getVariations()), function ($variation) use ($flagVariations) { |
There was a problem hiding this comment.
My understanding of closures in PHP suggests this is copying the value of $flagVariations and not referencing it. Not sure if this could provide an edge case where the $flagVariations array is modified outside of this set of functions.
dustin-sier
reviewed
Nov 3, 2021
src/Optimizely/Optimizely.php
Outdated
| if (!$this->getConfig()) { | ||
| $this->_logger->log( | ||
| Logger::ERROR, | ||
| "Optimizely SDK not configured properly yet." |
There was a problem hiding this comment.
Is there a static message for this that can be referenced?
dustin-sier
requested changes
Nov 3, 2021
dustin-sier
left a comment
There was a problem hiding this comment.
Have a few questions, once that's done LGTM
| public function findForcedDecision($context) | ||
| { | ||
| $foundVariationKey = null; | ||
| if (!$this->forcedDecisions) { |
ozayr-zaviar
approved these changes
Nov 4, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a set of new APIs for forced-decisions to OptimizelyUserContext:
Test plan