Skip to content

[FEATURE] expose flags metadata as per OpenFeature specification #181

Description

@vi-verrone

Requirements

Requirements

Summary

The SDK should expose the Flags Metadata to the client through EvaluationDetails and ResolutionDetails models, to align with OpenFeature Specification Requirement 1.4.14 and Requirement 2.2.9/2.2.10

Motivation

Currently, the SDK is missing the flag's metadata property in EvaluationDetails and ResolutionDetails, in the same way the setter for flag's metadata is missing in the builders EvaluationDetailsBuilderand ResolutionDetailsBuilder. Other SDKs are already aligned with the current OpenFeature Specification regarding flag's metadata and this one should follow the path of alignment with current specifications.

Proposed solution

  • Add the getMetadata() method into the EvaluationDetails and ResolutionDetails interfaces.
  • Add the withMetadata() method into the EvaluationDetailsBuilder and ResolutionDetailsBuilder builders.
  • Update any other codebase if needed.

Impact on current adoption

This is an additive change and current adoption from clients should be uneffected.

Open Questions

Should this be considered major update or minor update? PHP seems to not support default implementation for interface methods, this means that any possible external implementation of EvaluationDetails and ResolutionDetails may break on current adoption, anyway it's possible that other repos and projects directly use the implementation or the builders and going to minor update would be possible. With the current proposed approach I'd go for not breaking changes if possible, staying on minor update, if someone has other ideas or feedback you're welcome to share 🙏.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageThis issue needs to be investigated by a maintainerenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions