This is the first release of Psalm v6!
Users are encouraged to switch to Psalm v6 right away, as v5 is not supported anymore.
Also announcing Psalm's new support model: you can support Psalm development by requesting a support contract from Daniil Gentili, the only active maintainer of Psalm.
Support contracts can cover full integration of Psalm into existing codebases, support for Psalm issues and development of additional Psalm features.
See here » for info, pricing and contact information.
Main highlights of Psalm v6:
- PHP 8.4 support
- Amp v3 support
- PHP-Parser v5 support
- Fully overhauled dictionaries, for much more accurate and always up to date signatures for PHP and extension functions and methods, and much simpler PHP version upgrades.
ignoreInternalFunctionFalseReturn
andignoreInternalFunctionNullReturn
are nowfalse
by default: this means Psalm now warns when a false/null return type of a native function is not explicitly checked.- Modernization of the codebase for higher performance.
- Many other bugfixes and performance improvements.
Plugin authors should consult the changelog for info about BC-breaking changes.
What's Changed
Features
- Add --force-jit flag by @danog in #11165
- Xpath injection detection #10162 by @cgocast in #10163
- Backed enum value changed to Atomic instead of scalar int or strings by @tuqqu in #10165
- Introduce NonVariableReferenceReturn issue by @tuqqu in #10227
- Detect DoS by sleep #10178 by @cgocast in #10183
- Introduce
DuplicateProperty
issue by @tuqqu in #10265 - Disable ignoreInternalFunction(False|Null)Return by default by @robchett in #10211
- Add intl extension stub by @braindawg in #10276
- Improved type of callable-array by @robchett in #9794
- Add progress for scanning stage by @robchett in #10345
- Allow enum cases to be global constants by @robchett in #10339
- Report unused issue handler suppressions by @robchett in #10341
- Support @(no-)seal-(properties|methods) annotations without prefix by @robchett in #10344
- Stub constants for ZipArchive from ext-zip by @braindawg in #10332
- Allow type aliases for static variables by @robchett in #10362
- Inherit magic methods from @mixin by @robchett in #10356
- TaintedExtract by @cgocast in #10417
- feat: Default baseline file by @jorgsowa in #10696
- Add phpstub for amqp extension (php-amqp) by @mkilmanas in #11172
- Add phpstub for amqp extension (php-amqp) by @mkilmanas in #11181
Fixes
- Fix #10047 by @cgocast in #10048
- Respect stubs in all cases by @mmcev106 in #10092
- Hotfix Shepard build by @robchett in #10268
- Hotfix shepard build by @robchett in #10343
- Add constants from SOAP extension to stub by @braindawg in #10333
- Incorrectly asserting non-empty-list after combining with empty list by @robchett in #9787
- Consistent type docblock parsing by @robchett in #10326
- Fix stub for RecursiveArrayIterator::getChildren by @robchett in #10340
- Maintain loop start val after increment/decrement by @robchett in #10263
- Method annotation fixes by @robchett in #10361
- A segment of progress was being output early as the startScanningFile… by @robchett in #10360
- Fix at in array keys by @danog in #10426
- Inherit conditional returns by @robchett in #10357
- Fix iteration over weakmaps by @danog in #10472
- Suppress scanning output in CI by @robchett in #10688
- Suppress unused config suppression detection when running in partial or cache mode by @weirdan in #10694
- Fix trait analysis by @danog in #10904
Docs
- Doc typo by @cgocast in #10393
- Fixed docblock spacing in
@psalm-internal
documentation example by @still-dreaming-1 in #10467 - Update dealing_with_code_issues.md: Minor by @ThomasLandauer in #10954
- Fix broken links to PHPDoc Types page in documentation by @elazar in #11105
- Fix broken phpDocumentor links on Supported Annotations docs page by @elazar in #11119
Internal changes
- Switch to amp v3 by @danog in #10024
- Psalm v6 by @danog in #10040
- Make
TLiteralFloat::$value
andTLiteralInt::$value
typed by @weirdan in #9517 - Psalm v6: strict_types=1 by @danog in #10044
- V6 fixes by @danog in #10310
- Remove MixedInferredReturnType by @robchett in #9783
- Merge 5.x by @danog in #10369
- Improve scan progress by @danog in #10415
- Merge 5.x by @danog in #10504
- Apply rector fixes by @danog in #10305
- Do not use JIT on windows by @danog in #10564
- Let disable-extension also disable zend extensions by @danog in #10565
- Merge 5.x by @danog in #10569
- Merge 5.x by @danog in #10576
- Remove unnecessary null type from
initialized_methods
Context property by @theodorejb in #10610 - Update master from 5.x by @weirdan in #10597
- Update master from 5.x by @weirdan in #10618
- Update master from 5.x by @weirdan in #10656
- Update master from 5.x by @weirdan in #10684
- Fix composer warnings by @weirdan in #10695
- Update master from 5.x by @weirdan in #10693
- Update master from 5.x by @weirdan in #10714
- Update master from 5.x by @weirdan in #10750
- Update
master
from5.x
by @weirdan in #10775 - Update
master
from5.x
by @weirdan in #10803 - Fix the tests broken when running with Paratest by @weirdan in #11122
- Fix grammar by @MoonE in #11154
- Merge 5.x by @danog in #11164
- Normalize callmap by @danog in #11174
- Normalize callmap by @danog in #11175
- Remove unnecessary array spread of temp arrays by @MoonE in #11182
- PHP 8.4 support, dictionary refactoring by @danog in #11169
- Add support for PHP 8.4 by @GromNaN in #10928
Typos
- Fix typos by @szepeviktor in #10963
Other changes
- Update nikic/php-parser to 5.0 by @edsrzf in #10567
- 🐛 Fix "Config supression" link by @homersimpsons in #11185
New Contributors
- @braindawg made their first contribution in #10276
- @elazar made their first contribution in #11105
- @mkilmanas made their first contribution in #11172
- @homersimpsons made their first contribution in #11185
Full Changelog: 5.26.1...6.0.0