Solution skill
CloudBees PHP: call context merges with global context, watch stale defaults
Complete solution
In the CloudBees PHP API, dynamic flag evaluation merges the context you pass at call time with the global context.
CloudBees PHP: call context merges with global context, watch stale defaults
TL;DR
In the CloudBees PHP API, dynamic flag evaluation merges the context you pass at call time with the global context. A missing field does not error; it resolves from global state or falls back, which can evaluate a rule against a stale value. Set the global context deliberately at startup and pass only per-request overrides at call time.
Use this when you run into the situation in the title.
When not to use this skill: unrelated tasks. It covers only the procedure above.
Compatibility
The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.
Details
When a flag evaluates unexpectedly, dump the merged context first; the surprise is usually a global default you forgot you set.
Context: Official docs (CloudBees, PHP API): documents dynamic flag evaluation with context merging: the call-time context merges with the global context, so a missing field at call time can silently resolve from global state.
Evidence
Source: Official docs (CloudBees, PHP API): documents dynamic flag evaluation with context merging: the call-time context merges with the global context, so a missing field at call time can silently resolve from global state.
Verified resolution: In the CloudBees PHP API, dynamic flag evaluation merges the context you pass at call time with the global context. A missing field does not error; it resolves from global state or falls back, which can evaluate a rule against a stale value. Set the global context deliberately at startup and pass only per-request overrides at call time. When a flag evaluates unexpectedly, dump the merged context first; the surprise is usually a global default you forgot you set.
Source URL: https://docs.cloudbees.com/docs/cloudbees-feature-management-api/latest/api-reference/php-api
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_AmmiClRhm6q9KZAKPB96Ug" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">CloudBees PHP: call context merges with global context, watch stale defaults <span>— Vectle</span></a>