Skip to content

fix: stream context integration with HTTP method#3534

Merged
morrisonlevi merged 3 commits intomasterfrom
levi/streams-http-method
Dec 18, 2025
Merged

fix: stream context integration with HTTP method#3534
morrisonlevi merged 3 commits intomasterfrom
levi/streams-http-method

Conversation

@morrisonlevi
Copy link
Copy Markdown
Collaborator

@morrisonlevi morrisonlevi commented Dec 17, 2025

Description

The streams context uses the options array to set the HTTP method like so:

$options = ['http' => ['method' => 'GET', ...]];
stream_context_create($options)

But the code wasn't looking for $options['http']['method'], it was looking for $options['method'].

I found this because the previous code would have had an ASAN violation, but due to this bug, it wouldn't ever execute. You can see the CI runs for the middle commit that show the ASAN failure.

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.65%. Comparing base (3626b11) to head (788475b).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3534      +/-   ##
==========================================
- Coverage   61.74%   61.65%   -0.10%     
==========================================
  Files         143      143              
  Lines       13045    13045              
  Branches     1704     1704              
==========================================
- Hits         8055     8043      -12     
- Misses       4228     4238      +10     
- Partials      762      764       +2     

see 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3626b11...788475b. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Dec 17, 2025

Benchmarks [ tracer ]

Benchmark execution time: 2025-12-17 18:13:45

Comparing candidate commit 788475b in PR branch levi/streams-http-method with baseline commit 3626b11 in branch master.

Found 1 performance improvements and 7 performance regressions! Performance is the same for 184 metrics, 2 unstable metrics.

scenario:MessagePackSerializationBench/benchMessagePackSerialization

  • 🟥 execution_time [+4.364µs; +5.116µs] or [+4.280%; +5.018%]

scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache

  • 🟥 execution_time [+5.800µs; +7.220µs] or [+5.395%; +6.716%]

scenario:SamplingRuleMatchingBench/benchRegexMatching1

  • 🟥 execution_time [+75.680ns; +166.520ns] or [+6.391%; +14.062%]

scenario:SamplingRuleMatchingBench/benchRegexMatching2

  • 🟥 execution_time [+70.322ns; +157.478ns] or [+6.023%; +13.489%]

scenario:SamplingRuleMatchingBench/benchRegexMatching3

  • 🟥 execution_time [+72.375ns; +154.225ns] or [+6.102%; +13.003%]

scenario:SamplingRuleMatchingBench/benchRegexMatching4

  • 🟥 execution_time [+78.101ns; +146.299ns] or [+6.580%; +12.325%]

scenario:SpanBench/benchOpenTelemetryAPI

  • 🟥 mem_peak [+1.569MB; +1.595MB] or [+3.787%; +3.849%]

scenario:TraceSerializationBench/benchSerializeTrace

  • 🟩 execution_time [-38.501µs; -25.299µs] or [-8.585%; -5.641%]

@morrisonlevi morrisonlevi marked this pull request as ready for review December 17, 2025 17:08
@morrisonlevi morrisonlevi requested a review from a team as a code owner December 17, 2025 17:08
@morrisonlevi morrisonlevi requested a review from Leiyks December 17, 2025 17:09
@morrisonlevi morrisonlevi added 🐛 bug Something isn't working cat:integration labels Dec 17, 2025
@morrisonlevi morrisonlevi merged commit 503e6be into master Dec 18, 2025
2006 of 2007 checks passed
@morrisonlevi morrisonlevi deleted the levi/streams-http-method branch December 18, 2025 15:45
@github-actions github-actions Bot added this to the 1.16.0 milestone Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working cat:integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants