On level 1 Psalm now provides traces whenever mixed types occur in your code, to help you pinpoint where the mixed types were introduced. Here's an article that goes into more detail.
Some unused code is now a level 1 issue
Unused code detection breaks down into two main categories: function-scoped unused code (e.g. unused variables and unused closure params) and codebase-scoped (unused public methods, unused public properties).
Psalm has unused code detection for a long time, but it's always been opt-in. Now in version 4.7 all function-scoped unused code issues are emitted when using level 1, Psalm's strictest level.
This allows us to perform the aforementioned tracking of mixed types, because we're using the same underlying mechanism for both features. More importantly, it should also help you improve code quality, and avoid bugs.
Plugin hook for per-expression taint analysis
@mortenson has added a plugin that allows you to add and remove taint flows (#5398)
Error level XML autocompletion improvements
@weirdan made the XML config level more specific, allowing the value to be autocompleted in IDEs that understand the .xsd (#5476)
Add @psalm-ignore-var
Thanks to @sj-i you can now tell Psalm to ignore an inline @var type annotation with a @psalm-ignore-var tag (#5488)
Psalm level badges
If your project is open-source you can now show what Psalm level you use in a badge:
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Updates the requirements on vimeo/psalm to permit the latest version.
Release notes
Sourced from vimeo/psalm's releases.
... (truncated)
Commits
d4377c0
Check upper bound too2d197e3
Allow older composer/semver cc@xurizaemon
ec7de89
Do not let string subtypes subsume class-strings (#5497)9a714b7
Fix #5496 - ensure params extended in properties are properly fleshed outf41deea
Taint through reset callf24ef25
Add better trace for MixedOperand issues93743d1
Also add better message for MixedArgumentTypeCoercion54ac13b
Allow nested template unwrapping insidereset
,end
2f5bec3
Fix referenced4a3e36
Add Psalm level badgeDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)