open-feature / open-feature/php-sdk-contrib

[BUG] flagd provider silently falls back to localhost for valid rooted FQDN hosts (trailing dot)

Open Beginner friendly
#174 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Needs Triage
Dominant language
PHP
Stars
17
Forks
14
Avg merge
6d 16h
Merged PRs (30d)
6

Description

Observed behavior

When FlagdProvider is configured with a host that is a valid rooted/fully-qualified domain name ending in a dot (e.g. flagd.flagd.svc.cluster.local.), the provider silently ignores it and connects to localhost instead. No exception or warning is emitted, which makes this very hard to diagnose.

Expected Behavior

A rooted FQDN with a trailing dot should be accepted and used as-is. At minimum, an invalid host should raise InvalidConfigException rather than silently defaulting to localhost.

Steps to reproduce
new FlagdProvider([
    'host' => 'flagd.flagd.svc.cluster.local.', // note trailing dot
    'port' => 8013,
    'protocol' => 'http',
]);
// resolveBooleanValue(...) -> connects to http://localhost:8013, not the configured host

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at FlagdProvider configuration handling and follow resolveBooleanValue(...) to see where the configured host is validated or replaced. Reproduce with the rooted FQDN ending in a dot; done means that host is used as-is and invalid hosts raise InvalidConfigException instead of silently falling back to localhost.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.