-
Notifications
You must be signed in to change notification settings - Fork 214
PoC: Configuration\CompositeResolver and SPI discovery #1523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| use OpenTelemetry\SDK\Common\Configuration\Resolver\ResolverInterface; | ||
| use function str_starts_with; | ||
|
|
||
| #[PackageDependency('vlucas/phpdotenv', '^5.0')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I was only concerned about implementing our own .env parsing.
6a8e0fc to
93c01c3
Compare
d001679 to
21e4902
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1523 +/- ##
============================================
- Coverage 68.76% 68.28% -0.48%
- Complexity 2857 2868 +11
============================================
Files 425 429 +4
Lines 8704 8740 +36
============================================
- Hits 5985 5968 -17
- Misses 2719 2772 +53
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
This looks pretty solid now, would you like to rebase and we can get it merged @ChrisLightfootWild ? |
… resolvers via SPI.
Co-authored-by: Tobias Bachert <[email protected]>
79fb990 to
43561b2
Compare
...egration/SDK/Common/Configuration/test_configuration_resolves_with_registered_providers.phpt
Outdated
Show resolved
Hide resolved
ae297a4 to
a6abd70
Compare
Proof of concept, to cover the use-case where multi-application installs operate on shared-infra and wish to provide their own configuration.
See #1436.
Any suggestions on the best way to approach adding tests for these optional dependencies?
EDIT: I added a test. It's not my proudest moment, but I can't think of another way to beat the way the SDK currently bootstraps and triggers Configuration setup so early on. We could modify the
CompositeResolverto allow it's static instance to be reset - but that would be a change which was made purely to improve testability.