Skip to content

feat(profiling): add build compatibility with PHP 8.6 - #4084

Merged
realFlowControl merged 4 commits into
masterfrom
florian/php-86-profiling-build-fix
Jul 31, 2026
Merged

feat(profiling): add build compatibility with PHP 8.6#4084
realFlowControl merged 4 commits into
masterfrom
florian/php-86-profiling-build-fix

Conversation

@realFlowControl

@realFlowControl realFlowControl commented Jul 30, 2026

Copy link
Copy Markdown
Member

Description

Add PHP 8.6 build compatibility in the profiler by:

  • removing the ZEND_RESULT_CODE alias
  • including Zend/zend_compile.h for the ZEND_INTERNAL_FUNCTION const
  • the C compilation mode changes from strict C11/C17 to GNU11/GNU17 because PHP 8.6's ZEND_CONTAINER_OF uses typeof, which is a GNU extension before C23, using the GNU dialect keeps the existing C standard baseline without requiring C23-capable toolchains
  • Documents and locally allows the version-dependent zend_ini_entry.modified cast: it converts PHP 8.6's bool to u8 and is only redundant for PHP 8.5 and older

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@github-actions github-actions Bot added the profiling Relates to the Continuous Profiler label Jul 30, 2026
@realFlowControl realFlowControl changed the title fix(profiling): support PHP 8.6 feat(profiling): support PHP 8.6 Jul 30, 2026
@datadog-official

datadog-official Bot commented Jul 30, 2026

Copy link
Copy Markdown

Pipelines  Tests

Unblock PR with BitsAI

⚠️ Warnings

🚦 9 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-php | test_extension_ci: [8.2]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-php | test_extension_ci: [8.3]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-php | test_extension_ci: [8.4]   View in Datadog   GitLab

View all 9 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 60.67% (-0.02%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: d0a81c3 | Docs | Datadog PR Page | Give us feedback!

@realFlowControl
realFlowControl force-pushed the florian/php-86-profiling-build-fix branch from 3080a84 to d120f76 Compare July 30, 2026 15:24
@realFlowControl realFlowControl changed the title feat(profiling): support PHP 8.6 feat(profiling): make compileable with PHP 8.6 Jul 30, 2026
@realFlowControl realFlowControl changed the title feat(profiling): make compileable with PHP 8.6 feat(profiling): add build compatibility with PHP 8.6 Jul 30, 2026
@realFlowControl
realFlowControl marked this pull request as ready for review July 30, 2026 15:53
@realFlowControl
realFlowControl requested a review from a team as a code owner July 30, 2026 15:53
@pr-commenter

pr-commenter Bot commented Jul 30, 2026

Copy link
Copy Markdown

Benchmarks [ profiler ]

Benchmark execution time: 2026-07-30 15:57:52

Comparing candidate commit d0a81c3 in PR branch florian/php-86-profiling-build-fix with baseline commit 47bcde2 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 31 metrics, 5 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

@bwoebi bwoebi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@realFlowControl
realFlowControl merged commit af463f7 into master Jul 31, 2026
2149 of 2159 checks passed
@realFlowControl
realFlowControl deleted the florian/php-86-profiling-build-fix branch July 31, 2026 12:18
@github-actions github-actions Bot added this to the 1.24.0 milestone Jul 31, 2026

@morrisonlevi morrisonlevi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me as well! (Yes, I know it's merged ^_^)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

profiling Relates to the Continuous Profiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants