vimeo/psalm
Psalm is a powerful PHP static analysis tool that finds type errors and bugs before runtime. Install via Composer, configure for your codebase, and run it locally or try the live demo at psalm.dev. Docs and integrations available for teams and CI.
Full Changelog: https://github.com/vimeo/psalm/compare/6.16.0...6.16.1
Full Changelog: https://github.com/vimeo/psalm/compare/7.0.0-beta16...7.0.0-beta17
Full Changelog: https://github.com/vimeo/psalm/compare/6.15.1...6.16.0
This release allows using [@psalm-pure](https://github.com/psalm-pure) on classes, which will mark all methods as pure, and ban property declarations.
Full Changelog: https://github.com/vimeo/psalm/compare/7.0.0-beta15...7.0.0-beta16
This release features a major refactoring of Psalm's mutability inference system.
This release will likely be followed by a stable release.
The new automated mutability (pure, mutation free, externally mutation free, impure) attribute fixes that will be proposed by Psalm, when applied, will improve Psalm's type inference and especially security analysis, as pure functions are automatically specialized by Psalm, killing false positives during security analysis.
Now, Psalm will always analyze and emit MissingPureAnnotation and MissingImmutableAnnotation issues for all functions, methods and classes that can be marked with one of the following attributes (which can be automatically added by running Psalm with --alter --issues=MissingPureAnnotation,MissingImmutableAnnotation).
For functions and methods, MissingPureAnnotation will be emitted, automatically adding the following annotations:
[@psalm-pure](https://github.com/psalm-pure) » - Indicates that the function or method is pure, one whose output is just a function of its input (no mutations or even read property accesses allowed).[@psalm-mutation-free](https://github.com/psalm-mutation-free) » - Used to annotate a class method that does not mutate state, either internally or externally of the class's scope (only internal property reads on $this are allowed for methods)[@psalm-external-mutation-free](https://github.com/psalm-external-mutation-free) » - Used to annotate a class method that does not mutate state externally of the class's scope (internal property reads and writes on $this and self are allowed for methods)[@psalm-impure](https://github.com/psalm-impure) » - A new annotation, equivalent to the default mutability level of functions and methods (all mutations allowed): Psalm will require the explicit annotation of only abstract methods with this or any of the above annotations through a separate, non-autofixable MissingAbstractPureAnnotation issue, to improve mutability inference for implementors of an interface (though it can be used on all functions and methods as well).For classes, MissingImmutableAnnotation will be emitted, automatically adding the following annotations:
[@psalm-immutable](https://github.com/psalm-immutable) » - Used to annotate a class where every property is treated by consumers as [@psalm-readonly](https://github.com/psalm-readonly) and every instance method is treated as [@psalm-mutation-free](https://github.com/psalm-mutation-free).[@psalm-external-mutation-free](https://github.com/psalm-external-mutation-free) » - Used to annotate a class where every instance method is treated as [@psalm-external-mutation-free](https://github.com/psalm-external-mutation-free).[@psalm-mutable](https://github.com/psalm-mutable) » - A new annotation, used to annotate a class where at least one property is mutable: this is the default behavior, but it can be explicitly marked for clarity: Psalm will require the explicit annotation of only interfaces with this or any of the above annotations through a separate, non-autofixable MissingInterfaceImmutableAnnotation issue, to improve mutability inference for implementors of an interface (though it can be used on all classes and interfaces as well).For situations where the callable or Closure needs to be pure, mutation-free or externally mutation-free, the following subtypes are available:
[@psalm-pure](https://github.com/psalm-pure)
pure-callablepure-Closure$this are allowed for methods), equivalent to marking functions or methods with [@psalm-mutation-free](https://github.com/psalm-mutation-free)
self-accessing-callableself-accessing-Closure$this and self are allowed for methods), equivalent to marking functions or methods with [@psalm-external-mutation-free](https://github.com/psalm-external-mutation-free)
self-mutating-callableself-mutating-Closure[@psalm-impure](https://github.com/psalm-impure)
impure-callable (an alias to callable)impure-Closure (an alias to Closure)This can be useful when the callable is used in a function marked with [@psalm-pure](https://github.com/psalm-pure) or [@psalm-mutation-free](https://github.com/psalm-mutation-free) or [@psalm-external-mutation-free](https://github.com/psalm-external-mutation-free).
Full Changelog: https://github.com/vimeo/psalm/compare/6.15.1...7.0.0-beta15
Full Changelog: https://github.com/vimeo/psalm/compare/6.15.0...6.15.1
Note: GPG signatures for older releases will be regenerated shortly using the new 99BF4D9A33D65E1E key, since the old one expired.
Full Changelog: https://github.com/vimeo/psalm/compare/6.14.3...6.15.0
--config= cli parameter by @ThomasLandauer in https://github.com/vimeo/psalm/pull/11332Full Changelog: https://github.com/vimeo/psalm/compare/6.14.3...7.0.0-beta14
curl_close() function by @theodorejb in https://github.com/vimeo/psalm/pull/11626NoDiscard attribute as immutable by @Baptouuuu in https://github.com/vimeo/psalm/pull/11611Full Changelog: https://github.com/vimeo/psalm/compare/6.14.2...6.14.3
Full Changelog: https://github.com/vimeo/psalm/compare/6.14.1...6.14.2
Full Changelog: https://github.com/vimeo/psalm/compare/7.0.0-beta12...7.0.0-beta13
Full Changelog: https://github.com/vimeo/psalm/compare/6.14.0...6.14.1
clear command with ANSI escape codes to clear the screen by @HenkPoley in https://github.com/vimeo/psalm/pull/11528Full Changelog: https://github.com/vimeo/psalm/compare/7.0.0-beta11...7.0.0-beta12
Full Changelog: https://github.com/vimeo/psalm/compare/6.13.1...6.14.0
Full Changelog: https://github.com/vimeo/psalm/compare/6.13.0...6.13.1
iterator_to_array by @andrew-demb in https://github.com/vimeo/psalm/pull/11430arrayCache configuration key that can be used to disable the newly introduced array cache: this will slightly slow down execution times while reducing RAM usage, avoiding OOM issues on bigger codebases by @danogFull Changelog: https://github.com/vimeo/psalm/compare/7.0.0-beta10...7.0.0-beta11
iterator_to_array by @andrew-demb in https://github.com/vimeo/psalm/pull/11430arrayCache configuration key that can be used to disable the newly introduced array cache: this will slightly slow down execution times while reducing RAM usage, avoiding OOM issues on bigger codebases by @danogFull Changelog: https://github.com/vimeo/psalm/compare/6.12.1...6.13.0
Full Changelog: https://github.com/vimeo/psalm/compare/7.0.0-beta9...7.0.0-beta10
Full Changelog: https://github.com/vimeo/psalm/compare/6.12.0...6.12.1
Fixes:
Full Changelog: https://github.com/vimeo/psalm/compare/7.0.0-beta8...7.0.0-beta9
This release syncs up the 7.x branch with the 6.x branch.
numeric supertype by @kylekatarnls in https://github.com/vimeo/psalm/pull/11444Full Changelog: https://github.com/vimeo/psalm/compare/7.0.0-beta7...7.0.0-beta8
This release features a major cache refactoring, improving stability, removing race conditions and adding a new feature called cache consolidation, which consolidates the cache, normally composed of split files, into one single file with the --consolidate-cache flag, for quicker runs when doing whole project scans!
To use cache consolidation, simply run Psalm with the --consolidate-cache flag after running a normal analysis: running with this flag will skip analysis and only consolidate the cache.
If you consolidate your cache in CI runs, sure to re-consolidate the cache again after running Psalm before re-saving the updated cache.
numeric supertype by @kylekatarnls in https://github.com/vimeo/psalm/pull/11444Full Changelog: https://github.com/vimeo/psalm/compare/6.11.0...6.12.0
ClassFilePathProviderInterface plugin hook to polyfill custom autoloaders by @danog in https://github.com/vimeo/psalm/pull/11422Subscribe to the brand new Psalm newsletter to stay up to date with all of Psalm's news!
Full Changelog: https://github.com/vimeo/psalm/compare/6.10.3...6.11.0
Full Changelog: https://github.com/vimeo/psalm/compare/6.10.2...6.10.3
Full Changelog: https://github.com/vimeo/psalm/compare/7.0.0-beta6...7.0.0-beta7
Full Changelog: https://github.com/vimeo/psalm/compare/6.10.1...6.10.2
Full Changelog: https://github.com/vimeo/psalm/compare/7.0.0-beta5...7.0.0-beta6
Full Changelog: https://github.com/vimeo/psalm/compare/6.10.0...6.10.1
This beta release adds a major new feature to Psalm v7: combined analysis!
Combined analysis allows running normal analysis, security analysis and dead code analysis all at the same time, within a single run, greatly reducing overall runtimes!
Future beta releases will also enable taint analysis by default, given that now it can be run alongside normal analysis.
Full Changelog: https://github.com/vimeo/psalm/compare/7.0.0-beta4...7.0.0-beta5
Join the new official Psalm news channel and the Psalm community!
The news channel will be used to share inside exclusive news about upcoming Psalm features (including property hook support, coming within the next few releases!), and the community group can be used to discuss and share the way you use Psalm!
Full Changelog: https://github.com/vimeo/psalm/compare/7.0.0-beta3...7.0.0-beta4
Join the new official Psalm news channel and the Psalm community!
The news channel will be used to share inside exclusive news about upcoming Psalm features (including property hook support, coming within the next few releases!), and the community group can be used to discuss and share the way you use Psalm!
Full Changelog: https://github.com/vimeo/psalm/compare/6.9.6...6.10.0
Add git, ssh and composer to the docker image by @danog.
Full Changelog: https://github.com/vimeo/psalm/compare/6.9.5...6.9.6
Add git and composer to the docker image by @danog.
Full Changelog: https://github.com/vimeo/psalm/compare/7.0.0-beta2...7.0.0-beta3
Full Changelog: https://github.com/vimeo/psalm/compare/7.0.0-beta1...7.0.0-beta2
Full Changelog: https://github.com/vimeo/psalm/compare/6.9.4...6.9.5
How can I help you explore Laravel packages today?