Skip to content

feat: validate provider services and fix logger injection - #6

Merged
aubes merged 1 commit into
mainfrom
feature/provider-validation
Sep 28, 2026
Merged

aubes merged 1 commit into
mainfrom
feature/provider-validation

Conversation

@aubes

@aubes aubes commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Provider services are now validated at compile time with clearer errors:

  • The provider class must be set on the service itself. A provider created by a factory, or inheriting from a parent under an id that is not a class name, now needs an explicit class option (OpenFeature\interfaces\provider\Provider is accepted when the concrete class is unknown).
  • A missing class now fails with an explicit "cannot be found" message, and a provider whose parent class or interface is missing reports that missing class.

Logger injection fixes:

  • Providers now receive the application logger when MonologBundle is not installed; previously they got none.
  • A logger already set on a provider service (e.g. a dedicated Monolog channel) is no longer overridden.

@aubes
aubes merged commit 4f7c94f into main Sep 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant