What's Changed
Features
- Add @psalm-cli-only-instances: code requiring an instance of a class only instantiated from the command line is command-line code by @danog in #13635
- Honour FORCE_COLOR and share color detection across CLIs by @alies-dev in #13665
- Exit with code 2 when psalter --dry-run would change files by @alies-dev in #13666
- Let plugins mark a file's top-level code as CLI-only by @alies-dev in #13643
Fixes
- fix(match): analyse a match(true) arm once for all its conditions by @jirkace in #12842
- Perf: analyse an inherited constructor once per subclass (-5 to -9 % CPU) + fix false positive PropertyNotSetInConstructor by @alies-dev in #13240
- Fix: method with an unknown parameter class is analysed when its file is analysed again by @alies-dev in #12547
- fix(control-flow): preserve outer loop exits across switch cases #13620 by @orklah in #13627
- Fix unused variable detection for references returned by functions by @orklah in #13623
- Name the compared operator in int range comparison messages (#12109) by @jirkace in #12762
- fix(templates): resolve a method call on a template bounded by another template by @jirkace in #13107
- fix(closure): a closure that calls itself through a by-reference use has its own signature there by @jirkace in #13077
- Fix: analyse a file's namespace-level statements once, not for every subclass that follows into it (mediawiki -33 % CPU) by @alies-dev in #13592
- Fix: invalid file:// links for paths with spaces and Windows drives by @alies-dev in #13664
- fix(parser): read built-in constants without their deprecation by @shu-chen-dot-ca in #13601
- [7.x] Keep taint graph nodes as compact rows: worker results ~600 MB → 170 MB, main peak -1.1 GB by @jarstelfox in #13536
- Fix: psalter rejects the advertised
--monochromeoption by @alies-dev in #13669 - Fix: generic @mixin binds static to an earlier mixin declaring the same method by @alies-dev in #13673
- Fix: psalm-refactor --move and --rename never work by @alies-dev in #13679
- Fix: --show-info, --report-show-info and --threads misread their values by @alies-dev in #13680
- Fix: options after a path are ignored, so psalter --dry-run can rewrite files by @alies-dev in #13678
- Fix: psalter --file, --plugin and --codeowner resolve paths wrongly by @alies-dev in #13681
- Fix: psalm - (paths from STDIN) and empty path arguments crash by @alies-dev in #13682
- Fix: a class's own @mixin replaces the mixins inherited from its parent by @alies-dev in #13687
Internal changes
- Readable psalter output by @alies-dev in #13656
- Perf: read a location's compact state without a property table (taint, 1 thread: -1.8 % peak memory) by @alies-dev in #13674
- Require psalm/psalm-plugin-api 0.4.3 by @alies-dev in #13683
Other changes
- feat(callable): report a callable that takes a parameter by reference where it is called with a value by @jirkace in #13548
- fix(conditions): ignore what the left of an or tested of a variable the right reassigns by @jirkace in #13179
New Contributors
- @shu-chen-dot-ca made their first contribution in #13601
Full Changelog: 7.4.0...7.5.0