Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: launchdarkly/openfeature-php-server
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.0.0
Choose a base ref
...
head repository: launchdarkly/openfeature-php-server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.0.0
Choose a head ref
  • 15 commits
  • 18 files changed
  • 9 contributors

Commits on Jun 13, 2024

  1. Configuration menu
    Copy the full SHA
    78662ba View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2024

  1. Configuration menu
    Copy the full SHA
    28ef405 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2026

  1. Configuration menu
    Copy the full SHA
    77c9690 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dcadd5f View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2026

  1. [SEC-7924] chore: pin third-party GitHub Actions to commit SHAs

    Pin all third-party GitHub Actions to full-length commit SHAs to prevent
    supply chain attacks. Addresses findings from the
    third-party-action-not-pinned-to-commit-sha Semgrep rule.
    pkaeding committed Mar 23, 2026
    Configuration menu
    Copy the full SHA
    2f43e7f View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2026

  1. chore: pin third-party GitHub Actions to commit SHAs (#22)

    ## Summary
    
    Pin all third-party GitHub Actions to full-length commit SHAs to prevent
    supply chain attacks.
    
    Addresses findings from the
    [`third-party-action-not-pinned-to-commit-sha`](https://github.com/launchdarkly/semgrep-rules/blob/main/github-actions/third-party-action-not-pinned-to-commit-sha.yml)
    Semgrep rule.
    
    ## Test plan
    
    - [ ] Verify CI passes with pinned action SHAs
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > **Low Risk**
    > Low risk workflow hardening change that only pins
    `googleapis/release-please-action` to a specific commit to reduce
    supply-chain exposure.
    > 
    > **Overview**
    > Pins the `googleapis/release-please-action` used in the Release Please
    GitHub Actions workflow to a full commit SHA (still `v4`) instead of a
    floating version tag, improving supply-chain security without changing
    the workflow’s behavior.
    > 
    > <sup>Written by [Cursor
    Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
    2f43e7f. This will update automatically
    on new commits. Configure
    [here](https://cursor.com/dashboard?tab=bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    osm6495 authored Mar 24, 2026
    Configuration menu
    Copy the full SHA
    4d6a654 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2026

  1. Configuration menu
    Copy the full SHA
    183bf65 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2026

  1. ci: grant pull-requests:read so lint-pr-title workflow starts (#24)

    ## Summary
    
    Adds `permissions: pull-requests: read` at the workflow level in
    `.github/workflows/lint-pr-title.yml`.
    
    The reusable workflow at
    `launchdarkly/gh-actions/.github/workflows/lint-pr-title.yml@main` was
    updated (launchdarkly/gh-actions#86) to declare `permissions:
    pull-requests: read` at the job level. A reusable workflow can only
    request a subset of the permissions the caller grants, so without an
    explicit `permissions` block in the caller, every run hits
    `startup_failure`. Same fix as launchdarkly/sdk-meta#429.
    
    ## Review & Testing Checklist for Human
    
    - [ ] Verify the `Lint PR title` workflow run on this PR exits `success`
    rather than `startup_failure`
    
    ### Notes
    
    No product code is changed — workflow-only permissions fix being applied
    across SDK repos.
    
    Link to Devin session:
    https://app.devin.ai/sessions/c7b96da5c9074500aa684bc9a9ba1c31
    Requested by: @kinyoklion
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > **Low Risk**
    > Low risk: workflow-only change that adds minimal `pull-requests: read`
    permission to allow the reusable PR-title linter workflow to start
    successfully.
    > 
    > **Overview**
    > Ensures the `Lint PR title` GitHub Actions workflow can run by
    explicitly granting `pull-requests: read` permissions at the workflow
    level in `.github/workflows/lint-pr-title.yml`, matching the permissions
    required by the reused `launchdarkly/gh-actions` workflow.
    > 
    > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
    3fba275. Bugbot is set up for automated
    code reviews on this repo. Configure
    [here](https://www.cursor.com/dashboard/bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    kinyoklion authored May 8, 2026
    Configuration menu
    Copy the full SHA
    d0677e7 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2026

  1. Configuration menu
    Copy the full SHA
    91c6353 View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2026

  1. Update SECURITY.md to reflect bug bounty program (#25)

    ## Summary
    
    Updates `SECURITY.md` to direct security reporters to LaunchDarkly's Bug
    Bounty program.
    
    ## Changes
    
    - Security issues should be reported through the [Bug Bounty
    program](https://bugcrowd.com/engagements/launchdarkly-mbb-og) rather
    than via GitHub Issues or PRs
    - Clarifies that valid security issues may be eligible for a bounty
    
    This is a cross-repository update to standardize security reporting
    instructions across LaunchDarkly repositories.
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > **Low Risk**
    > Documentation-only change to security reporting instructions; no
    application or infrastructure code is modified.
    > 
    > **Overview**
    > **`SECURITY.md`** is updated so security reporting matches
    LaunchDarkly’s current process across repos.
    > 
    > The doc now **boldly warns** not to file GitHub Issues or PRs for
    vulnerabilities, with clearer rationale about public exposure. Reporting
    is directed to the **Bugcrowd** [Bug Bounty
    program](https://bugcrowd.com/engagements/launchdarkly-mbb-og) instead
    of the previous **HackerOne** link, and a line is added asking reporters
    **not to contact LaunchDarkly staff directly**.
    > 
    > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
    91c6353. Bugbot is set up for automated
    code reviews on this repo. Configure
    [here](https://www.cursor.com/dashboard/bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    kparkinson-ld authored Jun 4, 2026
    Configuration menu
    Copy the full SHA
    09c38de View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2026

  1. fix: Map the WRONG_TYPE error kind to TYPE_MISMATCH (#27)

    Maps the LaunchDarkly `WRONG_TYPE` evaluation error kind to the
    OpenFeature `TYPE_MISMATCH` error code.
    
    - The kind previously fell through to `GENERAL`, so an application could
    not distinguish a flag whose type does not match the requested one from
    any other evaluation error.
    - Found during the weekly OpenFeature provider audit; `OFP` requirement
    3.2.3 prescribes this mapping, and the Java, .NET, Python, Ruby and
    JavaScript providers all implement it.
    
    <details>
    <summary>Implementation details</summary>
    
    ```php
    case EvaluationReason::WRONG_TYPE_ERROR:
        return new ResolutionError(ErrorCode::TYPE_MISMATCH());
    ```
    
    **Requirements**
    
    - [x] I have added test coverage for new or changed functionality
    - [x] I have followed the repository's [pull request submission
    guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests)
    - [x] I have validated my changes against all supported platform
    versions
    
    **Related issues**
    
    None. The same gap was fixed this week in
    [openfeature-python-server#57](launchdarkly/openfeature-python-server#57)
    and [js-core#1888](launchdarkly/js-core#1888).
    
    **Describe the solution you've provided**
    
    `ResolutionDetailsConverter::errorKindToCode` gains the missing case.
    The LaunchDarkly PHP SDK reports this kind when a flag's value does not
    match the requested type, which OpenFeature represents as
    `TYPE_MISMATCH`.
    
    **Describe alternatives you've considered**
    
    None; the mapping is prescribed by the provider spec.
    
    **Testing**
    
    `make check` (`composer cs-check`, `composer phpstan`, `composer
    phpunit`). The new test drives the converter directly, since the
    provider's own type checking intercepts most mismatches before the SDK
    reports this kind.
    
    </details>
    
    
    Link to Devin session:
    https://app.devin.ai/sessions/38a6eaf69fcf41109e136a1d0fe5e899
    Open in Devin Desktop:
    https://app.devin.ai/desktop/session/38a6eaf69fcf41109e136a1d0fe5e899?variant=devin
    Requested by: @kinyoklion
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > **Overview**
    > When the LaunchDarkly SDK returns an evaluation error with kind
    `WRONG_TYPE_ERROR`, the OpenFeature provider now surfaces
    **`TYPE_MISMATCH`** instead of the generic **`GENERAL`** code.
    > 
    > **`ResolutionDetailsConverter::errorKindToCode`** gains the missing
    switch case so callers can tell a wrong flag type apart from other
    evaluation failures, matching OpenFeature provider spec **3.2.3** and
    the other LaunchDarkly OpenFeature SDKs.
    > 
    > A new unit test exercises the converter directly with
    `EvaluationReason::error(WRONG_TYPE_ERROR)` and asserts `Reason::ERROR`
    plus `ErrorCode::TYPE_MISMATCH()`.
    > 
    > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
    7fe8ed8. Bugbot is set up for automated
    code reviews on this repo. Configure
    [here](https://www.cursor.com/dashboard/bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    
    ---------
    
    Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
    kinyoklion and devin-ai-integration[bot] authored Sep 1, 2026
    Configuration menu
    Copy the full SHA
    481eb3c View commit details
    Browse the repository at this point in the history
  2. fix!: Do not add the targeting key as a custom attribute (#28)

    Stops `targetingKey` from being copied into the LaunchDarkly context as
    a custom attribute.
    
    - A typo in the attribute loop compared the *value* of the key (`$key
    === "targetingKey"`) instead of the attribute name (`$k ===
    "targetingKey"`), so the attribute was never skipped.
    - Every multi-context evaluation was therefore sending a redundant
    `targetingKey` attribute per sub-context, where it was visible to
    targeting rules and on the context in the LaunchDarkly UI.
    
    Before, for `{"kind": "multi", "organization": {"targetingKey":
    "org-key", "name": "the-org"}}`:
    
    ```json
    {"kind":"multi","organization":{"key":"org-key","name":"the-org","targetingKey":"org-key"}}
    ```
    
    <details>
    <summary>Implementation details</summary>
    
    Found during the weekly OpenFeature provider audit. `OFP` requirement
    2.3 names `targetingKey` as the source of the context key, and 2.4 only
    requires attributes *not* named in that section to become custom
    attributes, so this was a spec violation as well as noise.
    
    Only multi-contexts were affected in practice: for a single context the
    OpenFeature SDK keeps the targeting key outside the attributes, while a
    multi-context has to carry a `targetingKey` inside each per-kind
    attribute map. The fix is in the shared single-context builder, which
    handles both.
    
    **Requirements**
    
    - [x] I have added test coverage for new or changed functionality
    - [x] I have followed the repository's [pull request submission
    guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests)
    - [x] I have validated my changes against all supported platform
    versions
    
    **Related issues**
    
    None.
    
    **Describe the solution you've provided**
    
    The attribute name is compared to `"targetingKey"`, as was clearly
    intended by the surrounding code and its comment.
    
    **Describe alternatives you've considered**
    
    Filtering the attribute out in the multi-context builder only: that
    leaves the same latent bug in the single-context path if the SDK ever
    surfaces a `targetingKey` attribute there.
    
    **Additional context**
    
    Testing: `make check` (`composer cs-check`, `composer phpstan`,
    `composer phpunit`). The new test asserts both that the sub-context key
    is still taken from `targetingKey` and that no such custom attribute
    remains.
    
    </details>
    
    
    Link to Devin session:
    https://app.devin.ai/sessions/38a6eaf69fcf41109e136a1d0fe5e899
    Open in Devin Desktop:
    https://app.devin.ai/desktop/session/38a6eaf69fcf41109e136a1d0fe5e899?variant=devin
    Requested by: @kinyoklion
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > **Overview**
    > Fixes a one-character logic bug in `buildSingleContext` where the skip
    check used `$key === "targetingKey"` (the resolved context key) instead
    of `$k === "targetingKey"` (the attribute name). **`key`** was already
    skipped correctly; **`targetingKey`** was not, so multi-context
    evaluations could emit a duplicate `targetingKey` custom attribute on
    each sub-context while still using it for the LD context key.
    > 
    > Adds **`testMultiContextTargetingKeyIsNotAddedAsAnAttribute`** to
    assert the sub-context key comes from `targetingKey` and that
    `targetingKey` does not appear in serialized context JSON.
    > 
    > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
    9262dde. Bugbot is set up for automated
    code reviews on this repo. Configure
    [here](https://www.cursor.com/dashboard/bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    
    Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
    kinyoklion and devin-ai-integration[bot] authored Sep 1, 2026
    Configuration menu
    Copy the full SHA
    2fb07d1 View commit details
    Browse the repository at this point in the history
  3. docs: Add an OpenFeature feature matrix to the README (#30)

    Adds a feature matrix to the README, mirroring the OpenFeature PHP SDK's
    own matrix, so a reader can see at a glance what this provider does and
    does not do.
    
    - Most unsupported rows are limitations of the OpenFeature PHP SDK, not
    of this provider — eventing, shutdown, named clients, tracking,
    transaction context and flag metadata have no place in that SDK's
    provider interface — and each row says so, so they are not read as
    provider gaps.
    - Format matches the matrices added to the Java, Python, .NET and
    JavaScript providers this week, so the providers can be compared side by
    side.
    
    <details>
    <summary>Implementation details</summary>
    
    Rows and statuses were checked against the OpenFeature PHP SDK 2.3.0 and
    the LaunchDarkly PHP SDK 6.8.3 rather than copied from another provider:
    `OpenFeature\interfaces\provider\Provider` declares only the five
    `resolve*Value` methods plus hooks, logger and metadata accessors,
    `ProviderAware` holds a single provider for the whole API, and neither
    `EvaluationDetails` nor `ResolutionDetails` carries flag metadata.
    
    The three separate fixes opened alongside this (#27, #28, #29) are
    provider-side bugs within rows the matrix marks as supported, so they do
    not change any status here.
    
    **Requirements**
    
    - [x] I have added test coverage for new or changed functionality
    - [x] I have followed the repository's [pull request submission
    guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests)
    - [x] I have validated my changes against all supported platform
    versions
    
    **Related issues**
    
    None.
    
    **Describe the solution you've provided**
    
    A `## Feature matrix` section after the supported-versions section, with
    the same `Status | Feature | Notes` shape as the other LaunchDarkly
    OpenFeature providers.
    
    **Describe alternatives you've considered**
    
    Listing only the rows the OpenFeature PHP SDK's own matrix has: it would
    drop initialization, tracking, transaction context and flag metadata,
    which are exactly the rows readers coming from another LaunchDarkly
    provider will look for.
    
    **Additional context**
    
    Testing: documentation only; `make check` still passes.
    
    </details>
    
    
    Link to Devin session:
    https://app.devin.ai/sessions/38a6eaf69fcf41109e136a1d0fe5e899
    Open in Devin Desktop:
    https://app.devin.ai/desktop/session/38a6eaf69fcf41109e136a1d0fe5e899?variant=devin
    Requested by: @kinyoklion
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > **Overview**
    > Adds a **Feature matrix** section to the README (after supported PHP
    versions), aligned with the [OpenFeature PHP SDK feature
    list](https://github.com/open-feature/php-sdk#-features) and the same
    table shape used on other LaunchDarkly OpenFeature providers.
    > 
    > The table lists each capability with ✅/❌ status and notes: supported
    areas (flag types, targeting, hooks, logging, MultiProvider, extending
    via `LDClient`) and unsupported rows that call out whether the gap is
    the OpenFeature PHP SDK (e.g. named clients, eventing, shutdown,
    tracking, transaction context, flag metadata) versus provider behavior.
    > 
    > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
    da8803a. Bugbot is set up for automated
    code reviews on this repo. Configure
    [here](https://www.cursor.com/dashboard/bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    
    Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
    kinyoklion and devin-ai-integration[bot] authored Sep 1, 2026
    Configuration menu
    Copy the full SHA
    22b3759 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2026

  1. Configuration menu
    Copy the full SHA
    50c99d1 View commit details
    Browse the repository at this point in the history
  2. chore(main): release 2.0.0 (#31)

    🤖 I have created a release *beep* *boop*
    ---
    
    
    ##
    [2.0.0](1.0.0...2.0.0)
    (2026-10-21)
    
    
    ### ⚠ BREAKING CHANGES
    
    * Do not add the targeting key as a custom attribute
    ([#28](#28))
    
    ### Features
    
    * Require PHP 8.2 or later
    ([#32](#32))
    ([50c99d1](50c99d1))
    
    
    ### Bug Fixes
    
    * Do not add the targeting key as a custom attribute
    ([#28](#28))
    ([2fb07d1](2fb07d1))
    * Map the WRONG_TYPE error kind to TYPE_MISMATCH
    ([#27](#27))
    ([481eb3c](481eb3c))
    
    ---
    This PR was generated with [Release
    Please](https://github.com/googleapis/release-please). See
    [documentation](https://github.com/googleapis/release-please#release-please).
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > **Overview**
    > **Release 2.0.0** — bumps the package from `1.0.0` to `2.0.0` across
    Release Please manifest, `Provider::VERSION`, docs build title, and
    **CHANGELOG**.
    > 
    > This cut documents **breaking** behavior: the provider no longer
    copies the OpenFeature **targeting key** into LaunchDarkly custom
    attributes (only the LD context key). It also raises the minimum runtime
    to **PHP 8.2+** and notes a fix mapping LaunchDarkly **WRONG_TYPE**
    evaluations to OpenFeature **`TYPE_MISMATCH`** (already reflected in
    current `Provider` / converter code).
    > 
    > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
    5883fcd. Bugbot is set up for automated
    code reviews on this repo. Configure
    [here](https://www.cursor.com/dashboard/bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    
    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Oct 21, 2026
    Configuration menu
    Copy the full SHA
    48decda View commit details
    Browse the repository at this point in the history
Loading