open-feature / open-feature/php-sdk-contrib
[BUG] flagd provider silently falls back to localhost for valid rooted FQDN hosts (trailing dot)
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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