chore: update sdk readmes#1394
Conversation
✅ Deploy Preview for openfeature ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Code Review
This pull request updates the PHP SDK documentation to version 2.2.0, introducing comprehensive documentation for the new MultiProvider feature, its evaluation strategies, error handling, and custom strategy implementation. It also updates the SDK compatibility dataset and auto-generated timestamps across multiple SDK documentation files. The review feedback suggests correcting the spelling of 'behaviour' to 'behavior' in two instances within the PHP documentation to maintain consistency.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| By default, the Multi-Provider will evaluate all underlying providers in order and return the **first successful result**. If a provider indicates it does not have a flag (`FLAG_NOT_FOUND` error code), then it will be skipped and the next provider will be evaluated. If any provider throws or returns an error result, the operation will fail and the error will be returned. If no provider returns a successful result, the operation will fail with a `FLAG_NOT_FOUND` error code. | ||
|
|
||
| To change this behaviour, a different "strategy" can be provided: |
|
|
||
| 1. **FirstMatchStrategy** (default): Evaluates all providers in order and returns the first successful result. Providers that indicate `FLAG_NOT_FOUND` error will be skipped and the next provider will be evaluated. Any other error will cause the operation to fail and the error to be returned. | ||
| 2. **FirstSuccessfulStrategy**: Evaluates all providers in order and returns the first successful result. Any error will cause that provider to be skipped. If no successful result is returned, the set of errors will be returned. | ||
| 3. **ComparisonStrategy**: Evaluates all providers at one time. If every provider returns a successful result with the same value, then that result is returned. Otherwise, an error is returned immediately if any provider errors. When values do not agree, an optional callback will be executed to notify you of the mismatch, and the configured "fallback provider" value will be used. This can be useful when migrating between providers that are expected to contain identical configuration. You can easily spot mismatches in configuration without affecting flag behaviour. |
There was a problem hiding this comment.
To maintain spelling consistency with the rest of the document (which uses "behavior"), please use the American spelling "behavior" here.
3. **ComparisonStrategy**: Evaluates all providers at one time. If every provider returns a successful result with the same value, then that result is returned. Otherwise, an error is returned immediately if any provider errors. When values do not agree, an optional callback will be executed to notify you of the mismatch, and the configured "fallback provider" value will be used. This can be useful when migrating between providers that are expected to contain identical configuration. You can easily spot mismatches in configuration without affecting flag behavior.
5ba5db0 to
0f60132
Compare
96ae992 to
8a3c0f7
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughMultiple SDK reference pages were regenerated with refreshed timestamps and release badges. Angular, Go, Java, .NET, and PHP docs also changed content, and the SDK compatibility dataset was updated for five release entries. ChangesSDK Documentation Refresh
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/reference/sdks/server/php.mdx`:
- Around line 216-218: The strategy behavior descriptions contain conflicting
language about execution models that creates ambiguity. Review the descriptions
for FirstMatchStrategy, FirstSuccessfulStrategy, and ComparisonStrategy and
reconcile the inconsistent execution terminology. For each strategy, establish
one clear execution model: clarify whether providers are evaluated sequentially
or simultaneously, establish when results are returned (immediately on first
success vs. after all evaluations), and specify how errors are handled during
that execution flow. Ensure each strategy description uses unambiguous language
so readers understand exactly when and how providers are evaluated, and when
results or errors are returned.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 1a059395-c3b7-4b46-818a-31656d931e8c
📒 Files selected for processing (17)
docs/reference/sdks/client/kotlin.mdxdocs/reference/sdks/client/swift.mdxdocs/reference/sdks/client/web/angular.mdxdocs/reference/sdks/client/web/index.mdxdocs/reference/sdks/client/web/react.mdxdocs/reference/sdks/server/cpp.mdxdocs/reference/sdks/server/dart.mdxdocs/reference/sdks/server/dotnet.mdxdocs/reference/sdks/server/go.mdxdocs/reference/sdks/server/java.mdxdocs/reference/sdks/server/javascript/index.mdxdocs/reference/sdks/server/javascript/nestjs.mdxdocs/reference/sdks/server/php.mdxdocs/reference/sdks/server/python.mdxdocs/reference/sdks/server/ruby.mdxdocs/reference/sdks/server/rust.mdxsrc/datasets/sdks/sdk-compatibility.json
8fe761a to
969ca0f
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
docs/reference/sdks/server/php.mdx (1)
293-330: 📐 Maintainability & Code Quality | 🟠 Major | ⚖️ Poor tradeoffUnresolved contradiction in ComparisonStrategy execution model.
This issue was flagged in a previous review but remains unaddressed. Lines 295 and 324 describe ComparisonStrategy's execution in contradictory terms:
- Line 295: "Evaluates all providers at one time" (implies parallel/simultaneous)
- Line 324: "Evaluates ALL providers sequentially" (implies sequential)
These statements cannot both be true. Given the custom strategies section (lines 440–442) distinguishes between
RunMode::SEQUENTIALandRunMode::EVALUATE_ALL, ComparisonStrategy must use one or the other. The intro and behavior section must be reconciled to clearly state which execution model is actually used.Additionally, three style improvements from static analysis:
- Line 173: "in order to" → "to"
- Line 201: Three consecutive sentences start with "If" (refactor for flow)
- Line 315: "in the event that" → "if"
Suggested reconciliation for ComparisonStrategy
Determine the actual execution mode from the PHP SDK implementation, then apply one of these patterns:
Option A (if using RunMode::EVALUATE_ALL):
-Evaluates **all providers** at one time. If every provider returns... +Evaluates **all providers** in parallel. If every provider returns...-Evaluates **ALL providers** sequentially +Evaluates **ALL providers** in parallelOption B (if using RunMode::SEQUENTIAL):
-Evaluates **all providers** at one time. If every provider returns... +Evaluates **all providers** in order. If every provider returns...-Evaluates **ALL providers** sequentially +Evaluates **ALL providers** to completion before comparing resultsThen apply the style fixes:
-in order to determine +to determine -in the event that +if🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/reference/sdks/server/php.mdx` around lines 293 - 330, Resolve the contradiction in the ComparisonStrategy documentation by first determining the actual execution mode from the PHP SDK implementation, then update both the introductory description and the Behavior section to consistently describe whether ComparisonStrategy evaluates all providers sequentially or all at once to match the actual implementation. Additionally, apply three style improvements: on the line describing the ComparisonStrategy evaluation behavior at the start of the section, replace "in order to" with "to"; on the line with multiple consecutive "If" statements describing callback behavior, refactor the sentence structure for better flow; and on the line mentioning the fallback provider condition, replace "in the event that" with "if".
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@docs/reference/sdks/server/php.mdx`:
- Around line 293-330: Resolve the contradiction in the ComparisonStrategy
documentation by first determining the actual execution mode from the PHP SDK
implementation, then update both the introductory description and the Behavior
section to consistently describe whether ComparisonStrategy evaluates all
providers sequentially or all at once to match the actual implementation.
Additionally, apply three style improvements: on the line describing the
ComparisonStrategy evaluation behavior at the start of the section, replace "in
order to" with "to"; on the line with multiple consecutive "If" statements
describing callback behavior, refactor the sentence structure for better flow;
and on the line mentioning the fallback provider condition, replace "in the
event that" with "if".
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: cdcaa145-3ff5-4e4b-b080-75b92927c331
📒 Files selected for processing (17)
docs/reference/sdks/client/kotlin.mdxdocs/reference/sdks/client/swift.mdxdocs/reference/sdks/client/web/angular.mdxdocs/reference/sdks/client/web/index.mdxdocs/reference/sdks/client/web/react.mdxdocs/reference/sdks/server/cpp.mdxdocs/reference/sdks/server/dart.mdxdocs/reference/sdks/server/dotnet.mdxdocs/reference/sdks/server/go.mdxdocs/reference/sdks/server/java.mdxdocs/reference/sdks/server/javascript/index.mdxdocs/reference/sdks/server/javascript/nestjs.mdxdocs/reference/sdks/server/php.mdxdocs/reference/sdks/server/python.mdxdocs/reference/sdks/server/ruby.mdxdocs/reference/sdks/server/rust.mdxsrc/datasets/sdks/sdk-compatibility.json
✅ Files skipped from review due to trivial changes (13)
- docs/reference/sdks/server/python.mdx
- docs/reference/sdks/server/cpp.mdx
- docs/reference/sdks/client/kotlin.mdx
- docs/reference/sdks/client/swift.mdx
- docs/reference/sdks/server/rust.mdx
- docs/reference/sdks/server/ruby.mdx
- docs/reference/sdks/client/web/react.mdx
- docs/reference/sdks/client/web/index.mdx
- docs/reference/sdks/client/web/angular.mdx
- docs/reference/sdks/server/javascript/nestjs.mdx
- docs/reference/sdks/server/javascript/index.mdx
- docs/reference/sdks/server/dart.mdx
- docs/reference/sdks/server/go.mdx
🚧 Files skipped from review as they are similar to previous changes (2)
- docs/reference/sdks/server/dotnet.mdx
- docs/reference/sdks/server/java.mdx
969ca0f to
0e4b9a4
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
docs/reference/sdks/server/php.mdx (1)
216-218: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winInconsistent strategy execution wording is still present.
Line 216 says “evaluates all providers in order” but also “returns the first successful result,” and Line 295 (“at one time”) conflicts with Line 324 (“sequentially”). Please make each strategy’s execution model unambiguous and consistent.
Suggested wording tweak
-1. **FirstMatchStrategy** (default): Evaluates all providers in order and returns the first successful result. +1. **FirstMatchStrategy** (default): Evaluates providers in order and returns the first successful result. -3. **ComparisonStrategy**: Evaluates all providers at one time. +3. **ComparisonStrategy**: Evaluates all providers before determining the final result. -- Evaluates **ALL providers** sequentially +- Evaluates **ALL providers** before selecting a final resultAlso applies to: 295-295, 324-324
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/reference/sdks/server/php.mdx` around lines 216 - 218, The strategy descriptions in the php SDK docs use conflicting execution wording, so make each one explicit and consistent. Update the FirstMatchStrategy, FirstSuccessfulStrategy, and ComparisonStrategy text to clearly state whether providers are evaluated sequentially or in parallel, and avoid phrases like “all providers in order” or “at one time” unless they match the actual behavior. Use the strategy names themselves to keep the wording aligned across the section.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@docs/reference/sdks/server/php.mdx`:
- Around line 216-218: The strategy descriptions in the php SDK docs use
conflicting execution wording, so make each one explicit and consistent. Update
the FirstMatchStrategy, FirstSuccessfulStrategy, and ComparisonStrategy text to
clearly state whether providers are evaluated sequentially or in parallel, and
avoid phrases like “all providers in order” or “at one time” unless they match
the actual behavior. Use the strategy names themselves to keep the wording
aligned across the section.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 1369d0f3-7d40-41fd-aa65-b0dc6d53b839
📒 Files selected for processing (17)
docs/reference/sdks/client/kotlin.mdxdocs/reference/sdks/client/swift.mdxdocs/reference/sdks/client/web/angular.mdxdocs/reference/sdks/client/web/index.mdxdocs/reference/sdks/client/web/react.mdxdocs/reference/sdks/server/cpp.mdxdocs/reference/sdks/server/dart.mdxdocs/reference/sdks/server/dotnet.mdxdocs/reference/sdks/server/go.mdxdocs/reference/sdks/server/java.mdxdocs/reference/sdks/server/javascript/index.mdxdocs/reference/sdks/server/javascript/nestjs.mdxdocs/reference/sdks/server/php.mdxdocs/reference/sdks/server/python.mdxdocs/reference/sdks/server/ruby.mdxdocs/reference/sdks/server/rust.mdxsrc/datasets/sdks/sdk-compatibility.json
✅ Files skipped from review due to trivial changes (13)
- docs/reference/sdks/server/ruby.mdx
- docs/reference/sdks/client/swift.mdx
- docs/reference/sdks/server/cpp.mdx
- docs/reference/sdks/server/python.mdx
- docs/reference/sdks/client/web/react.mdx
- docs/reference/sdks/server/rust.mdx
- docs/reference/sdks/client/web/index.mdx
- docs/reference/sdks/client/kotlin.mdx
- docs/reference/sdks/server/dart.mdx
- src/datasets/sdks/sdk-compatibility.json
- docs/reference/sdks/server/javascript/index.mdx
- docs/reference/sdks/server/javascript/nestjs.mdx
- docs/reference/sdks/server/dotnet.mdx
🚧 Files skipped from review as they are similar to previous changes (3)
- docs/reference/sdks/server/java.mdx
- docs/reference/sdks/client/web/angular.mdx
- docs/reference/sdks/server/go.mdx
0e4b9a4 to
fb12dff
Compare
Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>
fb12dff to
0607158
Compare
The PR was automatically generated via the update-sdk-docs GitHub workflow.