Skip to content

docs: Require 2.1 in the README install snippet and fix the multi-context examples - #36

Open
kinyoklion wants to merge 2 commits into
mainfrom
devin/1794044272-readme-install-version
Open

kinyoklion wants to merge 2 commits into
mainfrom
devin/1794044272-readme-install-version

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Requirements

  • I have added test coverage for new or changed functionality (docs only)
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions (docs only)

Related issues

The same example bugs were fixed in the Python provider README in launchdarkly/openfeature-python-server#75.

Describe the solution you've provided

  • The Requisites snippet asked for "launchdarkly/openfeature-server": "^1.0". It now asks for ^2.1, the first release with the flag metadata the README describes. ^2.0 would still allow 2.0.0, which doesn't have it.
  • In "A multi-context containing a "user" and an "organization"", "targetingKey", "my-org-key", "myCustomAttribute", "myAttributeValue" and "anonymous", true used , where => belongs. That's valid PHP, but it builds list entries instead of attributes. They now use =>.
  • In "Setting private attributes in a multi-context", "kind" => "organization" is now "kind" => "multi", and "anonymous" = > true (a parse error) is now "anonymous" => true.
Verification

I ran php -l (PHP 8.4, composer:2 image) on every php block in the README; all of them pass. I also ran both multi-context examples through EvaluationContextConverter::toLdContext. Each builds a valid multi-context with organization and user kinds, and myCustomAttribute is private only on organization.

I checked the rest of the README for stale version text. The PHP 8.2 minimum matches composer.json, and the note that flag metadata needs OpenFeature PHP SDK 2.4.0 matches the open-feature/sdk ^2.4 requirement.

Describe alternatives you've considered

None.

Additional context

None.

SDK-3583


Note

Overview
Updates README Getting started and multi-context examples so install and copy-paste snippets match the 2.1+ provider and valid OpenFeature multi-context encoding.

The Composer requisites now require launchdarkly/openfeature-server ^2.1 (was ^1.0), aligning the install line with the first release that documents flag metadata. Multi-context PHP examples are corrected: list-style , entries become => key-value pairs, the private-attributes multi-context sets kind to multi (not organization), and a broken anonymous assignment is fixed to =>.

Reviewed by Cursor Bugbot for commit c45caef. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

…amples

Co-Authored-By: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>
@devin-ai-integration devin-ai-integration Bot changed the title docs: Update README install snippet to require version 2.0 docs: Require 2.1 in the README install snippet and fix the multi-context examples Nov 10, 2026
@kinyoklion
kinyoklion marked this pull request as ready for review November 16, 2026 22:18
@kinyoklion
kinyoklion requested a review from a team as a code owner November 16, 2026 22:18

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated risk review (dry run): Low

This PR would be automatically approved.

Why: The only change is README.md: the Composer install snippet now requires launchdarkly/openfeature-server ^2.1, and the multi-context examples fix => key-value syntax, kind multi, and a parse error. No library, CI, or policy files changed.

If you disagree with this review, share this PR in #feedback-agent-approvals or submit a changes-requested review explaining why.

Open in Web View Automation 

Sent by Cursor Approval Agent: Dry-Run PR Approver

@cursor cursor Bot added the risk:low label Nov 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant