DataDog / dd-trace-php

Datadog PHP Clients
https://docs.datadoghq.com/tracing/setup/php
Other
501 stars 155 forks source link

support multiple `PHP_INI_SCAN_DIR`'s #2941

Closed realFlowControl closed 1 week ago

realFlowControl commented 1 week ago

Description

In case a user sets the PHP_INI_SCAN_DIR environment variable to a special value with a leading or trailing : or has multiple directories separated by the default path separator, we need to handle this accordingly.

In case they use the trailing or leading : to just add or prepend to the default directory, there is no way for us to find that original value anymore, so we "just" always use the first explicitly defined path.

This is documented upstream at https://www.php.net/manual/en/configuration.file.php#configuration.file.scan

Thanks @rp-thomas for reporting

Reviewer checklist

codecov-commenter commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 73.97%. Comparing base (7b487bd) to head (dcf645a). Report is 1 commits behind head on master.

:exclamation: There is a different number of reports uploaded between BASE (7b487bd) and HEAD (dcf645a). Click for more details.

HEAD has 1 upload less than BASE | Flag | BASE (7b487bd) | HEAD (dcf645a) | |------|------|------| |tracer-php|12|11|
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2941/graphs/tree.svg?width=650&height=150&src=pr&token=eXio8H7vwF&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog)](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2941?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) ```diff @@ Coverage Diff @@ ## master #2941 +/- ## ============================================ - Coverage 82.10% 73.97% -8.13% Complexity 2527 2527 ============================================ Files 108 108 Lines 10360 10360 ============================================ - Hits 8506 7664 -842 - Misses 1854 2696 +842 ``` | [Flag](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2941/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [tracer-php](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2941/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `73.97% <ø> (-8.13%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog#carryforward-flags-in-the-pull-request-comment) to find out more. [see 8 files with indirect coverage changes](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2941/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2941?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2941?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog). Last update [7b487bd...dcf645a](https://app.codecov.io/gh/DataDog/dd-trace-php/pull/2941?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog).