Skip to content

fix(deps): unblock composer resolution under Psalm 6.16.1#579

Draft
nickmarden wants to merge 3 commits into
open-telemetry:mainfrom
nickmarden:ci-fix/main-php-qa
Draft

fix(deps): unblock composer resolution under Psalm 6.16.1#579
nickmarden wants to merge 3 commits into
open-telemetry:mainfrom
nickmarden:ci-fix/main-php-qa

Conversation

@nickmarden
Copy link
Copy Markdown
Contributor

Summary

PR #543 bumped vimeo/psalm to 6.16.1 across 40 sub-projects but left two surrounding constraints incompatible with the new Psalm, which broke composer resolution and took the entire CI matrix red.

This PR is a draft to validate the fix on real CI. It only touches composer.json files (no lock files; they're gitignored here anyway).

Why CI is currently red on main

  • psalm/plugin-phpunit ^0.20.0 pins psalm-plugin-api ^0.1, which conflicts with the plugin-api ^0.2 that ships with Psalm 6.10+. The latest plugin-phpunit release that supports Psalm 6.10+ is 0.19.7, so this constrains to ^0.19.7 across all sub-projects.
  • vimeo/psalm 6.16.1 requires netresearch/jsonmapper ^5.0, but phan/phan 5.x transitively pins it to <=4 via felixfbecker/advanced-json-rpc 3.2.1. phan/phan 6.0.5 drops that dep and accepts jsonmapper ^5.0, so this widens phan/phan to ^5 || ^6 (or ^5.4 || ^6 where the floor was 5.4).

Verified locally that composer install --dry-run resolves cleanly for all 45 sub-projects after these changes.

Test plan

PR open-telemetry#543 bumped vimeo/psalm to 6.16.1 across 40 sub-projects but did
not adjust the surrounding constraints, causing composer resolution
to fail (and breaking the entire CI matrix) for two reasons:

- psalm/plugin-phpunit ^0.20.0 pins psalm-plugin-api ^0.1, which
  conflicts with the plugin-api ^0.2 that ships with Psalm 6.10+.
  The latest plugin-phpunit release that supports Psalm 6.10+ is
  0.19.7, so constrain to ^0.19.7 across all sub-projects.

- vimeo/psalm 6.16.1 requires netresearch/jsonmapper ^5.0, but
  phan/phan 5.x transitively pins it to <=4 via felixfbecker/
  advanced-json-rpc 3.2.1. phan 6.0.5 drops that dep and accepts
  jsonmapper ^5.0, so widen phan/phan to ^5 || ^6 (or ^5.4 || ^6
  where the floor was 5.4).

Verified locally that composer install --dry-run resolves cleanly
for all 45 sub-projects after these changes.
@bobstrecansky
Copy link
Copy Markdown
Contributor

@nickmarden - is there a reason this is still in draft? I'd love to get this reviewed and merged!

@nickmarden
Copy link
Copy Markdown
Contributor Author

@nickmarden - is there a reason this is still in draft? I'd love to get this reviewed and merged!

Uh...primarily because CI was still super-red. I was working through this with the 🤖 and lost the thread when I traveled from Europe to the USA over the weekend :-)

The robot and I are looking at it now.

Psalm 6.x added MissingOverrideAttribute enforcement and Phan 6.x added
PhanCompatibleOverrideAttribute warnings for #[Override] usage below PHP
8.3. Both checks fire across almost every sub-project once composer
resolution is unblocked (fixed in the prior commit).

- Add <MissingOverrideAttribute errorLevel="suppress" /> to all 46
  psalm.xml.dist files. This is a config-level suppression; adding
  #[Override] everywhere is a separate cleanup task.
- Add PhanCompatibleOverrideAttribute to suppress_issue_types in all 38
  project-level .phan/config.php files (including root shared config used
  by Aws and Symfony via symlink).
- Add src/Utils/Test/.phan/config.php: the project had no phan config,
  causing Phan 6 to recursively analyse vendor/ and crash on ramsey/uuid.
- Remove deprecated InstrumentationInterface and InstrumentationTrait from
  AwsSdkInstrumentation; replace with explicit private properties. All
  methods used by callers and tests are already explicitly defined on the
  class.
- Suppress PhanTypeMismatchArgument on AwsLambdaWrapper OtlpExporter
  construction (TransportInterface generic type narrowing issue).
Leftover artifact from a symlink repair gone wrong during the prior
commit; .phan/.phan should not be tracked.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.25%. Comparing base (8825cb8) to head (9bffacb).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##               main     #579       +/-   ##
=============================================
- Coverage     97.43%   85.25%   -12.19%     
- Complexity       11      787      +776     
=============================================
  Files             1       53       +52     
  Lines            39     2997     +2958     
=============================================
+ Hits             38     2555     +2517     
- Misses            1      442      +441     
Flag Coverage Δ
Aws 93.46% <ø> (?)
Instrumentation/AwsSdk 82.14% <ø> (?)
Instrumentation/CodeIgniter 79.31% <ø> (?)
Instrumentation/ExtAmqp 88.80% <ø> (?)
Instrumentation/Guzzle 76.25% <ø> (?)
Instrumentation/HttpAsyncClient 78.94% <ø> (?)
Instrumentation/HttpConfig 28.76% <ø> (?)
Instrumentation/IO 0.00% <ø> (?)
Instrumentation/MySqli 93.39% <ø> (?)
Instrumentation/OpenAIPHP 86.71% <ø> (?)
Instrumentation/PostgreSql 91.36% <ø> (?)
Instrumentation/Psr14 77.41% <ø> (?)
Instrumentation/Psr15 89.74% <ø> (?)
Instrumentation/Psr16 97.43% <ø> (ø)
Instrumentation/Psr18 79.41% <ø> (?)
Instrumentation/Psr6 97.56% <ø> (?)
Instrumentation/Slim 84.21% <ø> (?)
Propagation/Instana 98.07% <ø> (?)
Propagation/ServerTiming 94.73% <ø> (?)
ResourceDetectors/Azure 91.66% <ø> (?)
ResourceDetectors/DigitalOcean 100.00% <ø> (?)

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

Files with missing lines Coverage Δ
src/Aws/src/AwsSdkInstrumentation.php 95.50% <ø> (ø)
src/Aws/src/Lambda/AwsLambdaWrapper.php 97.50% <ø> (ø)

... and 50 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 fecdca7...9bffacb. Read the comment docs.

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

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.

2 participants