Skip to content

fix: resolve PDO WeakMap warning#334

Merged
brettmc merged 1 commit into
open-telemetry:mainfrom
ycchuang99:fix/pdo-weak-map-warning
Mar 18, 2025
Merged

fix: resolve PDO WeakMap warning#334
brettmc merged 1 commit into
open-telemetry:mainfrom
ycchuang99:fix/pdo-weak-map-warning

Conversation

@ycchuang99

Copy link
Copy Markdown
Contributor

Replace comparison operators with null coalescing operator to fix undefined array error.

Fixes #1529

@ycchuang99
ycchuang99 requested a review from a team as a code owner March 17, 2025 06:54
@welcome

welcome Bot commented Mar 17, 2025

Copy link
Copy Markdown

Thanks for opening your first pull request! If you haven't yet signed our Contributor License Agreement (CLA), then please do so that we can accept your contribution. A link should appear shortly in this PR if you have not already signed one.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Mar 17, 2025

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: ycchuang99 / name: Evan (fd5017d)

@ycchuang99
ycchuang99 force-pushed the fix/pdo-weak-map-warning branch 2 times, most recently from ba88de5 to 072800c Compare March 17, 2025 07:31
brettmc
brettmc previously approved these changes Mar 17, 2025
@codecov

codecov Bot commented Mar 17, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.42%. Comparing base (5c9ab13) to head (fd5017d).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #334   +/-   ##
=========================================
  Coverage     80.42%   80.42%           
+ Complexity     1502     1500    -2     
=========================================
  Files           128      128           
  Lines          6176     6176           
=========================================
  Hits           4967     4967           
  Misses         1209     1209           
Flag Coverage Δ
Aws 85.55% <ø> (ø)
Context/Swoole 0.00% <ø> (ø)
Instrumentation/CakePHP 20.27% <ø> (ø)
Instrumentation/CodeIgniter 73.77% <ø> (ø)
Instrumentation/Curl 90.42% <ø> (ø)
Instrumentation/ExtAmqp 89.26% <ø> (ø)
Instrumentation/ExtRdKafka 86.23% <ø> (ø)
Instrumentation/Guzzle 69.51% <ø> (ø)
Instrumentation/HttpAsyncClient 78.31% <ø> (ø)
Instrumentation/IO 70.68% <ø> (ø)
Instrumentation/Laravel 62.68% <ø> (ø)
Instrumentation/MongoDB 74.28% <ø> (ø)
Instrumentation/MySqli 95.81% <ø> (ø)
Instrumentation/OpenAIPHP 87.31% <ø> (ø)
Instrumentation/PDO 90.15% <100.00%> (ø)
Instrumentation/Psr14 77.14% <ø> (ø)
Instrumentation/Psr15 89.41% <ø> (ø)
Instrumentation/Psr16 97.56% <ø> (ø)
Instrumentation/Psr18 77.77% <ø> (ø)
Instrumentation/Psr3 59.49% <ø> (ø)
Instrumentation/Psr6 97.67% <ø> (ø)
Instrumentation/Slim 86.30% <ø> (ø)
Instrumentation/Symfony 84.93% <ø> (ø)
Instrumentation/Yii 77.68% <ø> (ø)
Logs/Monolog 100.00% <ø> (ø)
Propagation/TraceResponse 100.00% <ø> (ø)
ResourceDetectors/Azure 91.66% <ø> (ø)
ResourceDetectors/Container 93.02% <ø> (ø)
Sampler/RuleBased 33.51% <ø> (ø)
Shims/OpenTracing 92.45% <ø> (ø)
Symfony 87.81% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/Instrumentation/PDO/src/PDOTracker.php 76.27% <100.00%> (ø)

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 5c9ab13...fd5017d. Read the comment docs.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@brettmc

brettmc commented Mar 17, 2025

Copy link
Copy Markdown
Contributor

@ycchuang99 can you please check the psalm errors reported against PDO? I think they're related to this fix.

@brettmc
brettmc dismissed their stale review March 17, 2025 10:14

looks ok, but build failures to be fixed

@ycchuang99

Copy link
Copy Markdown
Contributor Author

@brettmc Thanks for the reminder! I will take a look at it.

@ycchuang99
ycchuang99 force-pushed the fix/pdo-weak-map-warning branch from 072800c to 11fcb91 Compare March 18, 2025 01:21
@ycchuang99
ycchuang99 marked this pull request as draft March 18, 2025 01:48
Replace comparison operators with null coalescing operator to fix undefined array error.

Fixes open-telemetry/opentelemetry-php#1529
@ycchuang99
ycchuang99 force-pushed the fix/pdo-weak-map-warning branch from 11fcb91 to fd5017d Compare March 18, 2025 02:29
@ycchuang99
ycchuang99 marked this pull request as ready for review March 18, 2025 02:33
@ycchuang99

Copy link
Copy Markdown
Contributor Author

Hi @brettmc,

I've fixed the Psalm errors, but I'm not sure if it's the proper way to resolve them. Could you review the changes and let me know if any adjustments are needed? Thanks!

@brettmc
brettmc merged commit dcc9821 into open-telemetry:main Mar 18, 2025
@ycchuang99
ycchuang99 deleted the fix/pdo-weak-map-warning branch March 18, 2025 03:40
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.

[opentelemetry-php-contrib] Auto PDO warning log when running unit test with sqlite

2 participants