Fix CI: suppress RepeatedField psalm errors, restore PHP 8.1 support#1966
Open
bobstrecansky wants to merge 1 commit into
Open
Fix CI: suppress RepeatedField psalm errors, restore PHP 8.1 support#1966bobstrecansky wants to merge 1 commit into
bobstrecansky wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1966 +/- ##
============================================
+ Coverage 67.75% 67.78% +0.02%
Complexity 3044 3044
============================================
Files 459 459
Lines 8883 8885 +2
============================================
+ Hits 6019 6023 +4
+ Misses 2864 2862 -2
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Three issues are currently failing PHP QA on main: 1. Psalm reports 32 UndefinedDocblockClass errors against Google\Protobuf\Internal\RepeatedField on every Otlp converter. google/protobuf 4.x deprecated the Internal class in favor of Google\Protobuf\RepeatedField; the legacy name is now a runtime class_alias that Psalm's static parser cannot see. Add an UndefinedDocblockClass suppression alongside the existing UndefinedMethod suppression for the same class. 2. The PHP 8.1 matrix job fails composer install because phpspec/prophecy 1.26 dropped PHP 8.1 in 1.23 and requires phpdocumentor/reflection-docblock ^6, which itself needs prophecy 1.26. Revert both renovate bumps (open-telemetry#1915, open-telemetry#1919) to the prior constraints so the project's declared "php": "^8.1" support holds. 3. With Psalm fixed, PHPStan now runs and reports an undefined method Google\Protobuf\FieldDescriptor::getLabel() in ProtobufSerializer::traverseDescriptor(). That branch is dead code under google/protobuf >= 4.31 (the serializeToJsonString path returns early via PrintOptions), but PHPStan cannot infer that. See open-telemetry#1880, which reverted the prior compile-time fix for the same reason. Suppress the warning scoped to the one file.
e055c99 to
1558b6a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UndefinedDocblockClasssuppression forGoogle\Protobuf\Internal\RepeatedField(mirrors the existingUndefinedMethodsuppression for the same class). Clears the 32 errors blocking PHP QA on 8.2 / 8.3 / 8.4.composer installon PHP 8.1: pinphpspec/prophecyback to1.22.*(1.23+ dropped PHP 8.1) andphpdocumentor/reflection-docblockback to^5.3(prophecy 1.22 conflicts with v6). Restores the project's declared"php": "^8.1"support.Supersedes #1959 (same psalm fix) and reverts the install-breaking parts of #1915 and #1919.
Test plan
EOF