-
Notifications
You must be signed in to change notification settings - Fork 266
PHPLIB-1752 Upgrade to psalm 6.14 #1814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v2.x
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2.x #1814 +/- ##
============================================
+ Coverage 87.72% 87.74% +0.01%
+ Complexity 3195 3185 -10
============================================
Files 424 424
Lines 6296 6289 -7
============================================
- Hits 5523 5518 -5
+ Misses 773 771 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
psalm-baseline.xml
Outdated
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <files psalm-version="6.5.1@3f17a6b24a2dbe543e21408c2b19108cf6a355ef"> | ||
| <files psalm-version="6.14.2@bbd217fc98c0daa0a13aea2a7f119d03ba3fc9a0"> | ||
| <file src="examples/aggregate.php"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
psalm is unable to understand the return type of $client->__get():
mongo-php-library/src/Client.php
Line 176 in 8eb0501
| public function __get(string $databaseName): Database |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <InvalidAttribute> | ||
| <code><![CDATA[NoDiscard]]></code> | ||
| <code><![CDATA[NoDiscard]]></code> | ||
| </InvalidAttribute> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Psalm doesn't know this new attribute.
4860d31 to
eb1f6b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR upgrades the Psalm static analysis tool from version 6.5 to 6.14.2 and updates the PHP version used in CI workflows from 8.2 to 8.5.
Key changes:
- Upgraded Psalm dependency and updated baseline file with new version-specific suppressions
- Added
@psalm-no-seal-propertiesannotations toClientandDatabaseclasses - Updated static analysis workflow to use PHP 8.5
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| composer.json | Updated Psalm version constraint from 6.5.* to ~6.14.2 |
| psalm-baseline.xml | Updated baseline with new Psalm version and added/removed issue suppressions |
| psalm.xml.dist | Added suppressions for MissingOverrideAttribute and ClassMustBeFinal issues |
| src/Client.php | Added @psalm-no-seal-properties annotation to prevent property sealing |
| src/Database.php | Added @psalm-no-seal-properties annotation to prevent property sealing |
| .github/workflows/static-analysis.yml | Updated PHP version from 8.2 to 8.5 for static analysis |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fix PHPLIB-1752