github vimeo/psalm 7.0.0-rc28

pre-release2 hours ago

What's Changed

Removed

  • Drop the BC baseline entry for an unreleased storage property by @alies-dev in #13000

Features

  • Accept PHP 8.6 as an analysis target and require nikic/php-parser ^5.9 by @alies-dev in #12888
  • Declare the PHP 8.6 Time\Duration, SortDirection and poll API classes by @alies-dev in #12953
  • Declare the PHP 8.6 StreamError/StreamException, Uri\* builder, Openssl\*, IntlNumberRangeFormatter and Snmp\* classes and enums by @alies-dev in #12967
  • Support class template defaults (@template T = Default) by @alies-dev in #12962
  • Support function and method template defaults (@template T = Default) by @alies-dev in #12963
  • Support the PHP 8.5 pipe operator (inter types for basic cases, do not crash) by @alies-dev in #12964
  • Support PHP 8.6 partial function application (PFA) by @alies-dev in #12998
  • Make purity annotation suggestions opt-in by @alies-dev in #12956

Fixes

  • [6.x] Fix: conditional return type in @method is not resolved by @alies-dev in #12206
  • [6.x] Fix crash on first-class callable static call forwarded through @mixin by @alies-dev in #12133
  • Perf: Fix taint analysis running out of memory on arrays with many literal keys by @alies-dev in #12625
  • fix(psalter): add never as the native return type from PHP 8.1 by @jirkace in #12900
  • Perf: Fix taint analysis running out of memory linking generator sends by @alies-dev in #12618
  • fix(docblock): misplaced variable in a promoted property docblock is an issue, not a crash by @jirkace in #12898
  • fix(coalesce): the left side of ?? throw is set afterwards by @jirkace in #12925
  • Fix crashes on NAN, INF and out-of-range float literals on PHP 8.5+ by @alies-dev in #12902
  • Fix: PHP 8.6 readonly property defaults and __debugInfo() on enums by @alies-dev in #12936
  • Fix: PHP 8.6 call map lacks the PECL extensions that don't build on 8.6 yet by @alies-dev in #12938
  • [7.x] Fix taint analysis missing a send to a generator that was itself sent to a generator by @alies-dev in #12519
  • Infer the type of PHP 8.6 clamp() from its arguments by @alies-dev in #12950
  • [7.x] Perf: build and freeze unions without re-assigning every property by @alies-dev in #12560
  • fix(coalesce): analyse computed array offsets of ?? in isset mode by @jirkace in #12948
  • fix(callmap): DateTimeInterface::diff names its first parameter targetObject since PHP 8.0 by @jirkace in #12975
  • Fix: crash on array_multisort() flags when Psalm runs on PHP 8.6 by @alies-dev in #12969
  • Leave a template out of new for a template-free constructor argument by @alies-dev in #12993
  • Fix: report writes to readonly properties through literal computed names by @alies-dev in #12947
  • Fix: template inferred as its bound when an unbound argument comes first by @alies-dev in #12979
  • Fix: function template bound can't reference a template declared with another tag prefix by @alies-dev in #12999
  • Fix: crash on a property assertion about a non-variable argument by @alies-dev in #12980
  • Pipe: Report by-reference parameters given the left-hand side of a pipe by @alies-dev in #12971
  • [7.x] Fix: which declaration of a class defined in several files wins depends on scan order by @alies-dev in #13001
  • Fix: psalter deletes side effects after a property fetch when removing unused variables by @alies-dev in #13002
  • fix(types): accept iterable where array|object is expected by @jirkace in #12952
  • fix(stubs): DOMXPath::evaluate returns a typed result, not only a node list by @jirkace in #13003
  • Keep the callable flag of a keyed array when expanding or narrowing it by @jirkace in #12593
  • Add strictNullableComparison option reporting nullable operands of < > <= >= by @jirkace in #12691
  • A named argument of a variadic doesn't take a fixed parameter's taint node (#12251) by @jirkace in #12760
  • Fix: ParseError is not reported again on a warm cache by @alies-dev in #13012
  • Substitute class templates and static in first-class callables of methods by @alies-dev in #13008
  • Fix: quadratic taint resolution past a helper whose calls aren't specialized by @alies-dev in #12958
  • Substitute class templates in partial applications of methods by @alies-dev in #13011
  • Fix: false RedundantCondition on narrowing arguments of magic method calls by @alies-dev in #13023
  • Fix: table report crashes on issue messages containing console style tags by @alies-dev in #13035
  • fix(config): memcached is a supported extension, as config.xsd and the stub say by @jirkace in #13030
  • fix(call): keep the intersection of the bound of a template when calling a method by @alies-dev in #13040
  • Fix: global variable loses its declared type after a call by @alies-dev in #13048
  • Fix: PossiblyInvalidOperand on concat of int operand with null or false by @alies-dev in #13033
  • Fix: duplicate cast issue next to an argument issue when a data-flow graph is built by @alies-dev in #13052
  • Use ghcr.io/psalm/psalm in the generated GitHub Actions workflow by @danog in #13055

Docs

  • docs(report): the by-issue-level heading names error level 1, not 0 by @jirkace in #12790
  • docs(error-levels): list CheckType and test that every issue is listed once by @jirkace in #12645
  • Document the result of reportMixedIssues at each error level by @jirkace in #12614
  • Document the ArgumentTypeCoercion of a built-in with a narrower type by @jirkace in #12603
  • docs: fix the @psalm-yield example by @jirkace in #12885
  • Update the callmap docs to the current generation pipeline by @alies-dev in #12939
  • docs: explain how the taint graph works by @jirkace in #12912
  • docs: add a page on packaging Psalm from a source archive by @jirkace in #12907
  • docs: make the assert-if-true property example work as written by @jirkace in #12893
  • docs: show what an equality assertion changes by @jirkace in #12892
  • docs(taint): how to suppress a taint issue by @jirkace in #12855
  • docs: describe how to verify the callmap and shrink its ignore list by @jirkace in #12853
  • docs: warn about exposing psalm.xml and the baseline by @jirkace in #12852
  • docs: explain that issue pages need a <?php block that raises the issue by @jirkace in #12857
  • docs: InaccessibleProperty for readonly properties by @jirkace in #12894
  • docs: lowercase-string only knows ASCII uppercase letters by @jirkace in #12886
  • docs: risk, mitigations and resources on the Tainted* pages by @jirkace in #12897
  • test(docs): every issue is listed under its error level by @jirkace in #12856
  • docs: document @psalm-stub-override by @jirkace in #12884
  • docs: common questions page and a bug report template by @jirkace in #12913
  • Soften the purity suggestion messages and tidy their docs by @alies-dev in #13020
  • Document the Psalm GitHub actions by @danog in #13050

Internal changes

  • [CI] Add a perf and issue-diff check over a pinned corpus of real projects by @alies-dev in #12838
  • [Tests] Load an extension stub only when the test uses the extension by @alies-dev in #12795
  • [Tests] Keep the parsed stubs in memory across test cases by @alies-dev in #12796
  • [Tests] Rewrite only the final classes the tests extend or mock by @alies-dev in #12797
  • [Tests] Keep the parsed CallMap signatures until the analysed PHP version changes by @alies-dev in #12803
  • Merge 6.x into master by @alies-dev in #12872
  • [CI] Cancel the CI run of a pull request when a new commit is pushed to it by @alies-dev in #12798
  • [CI] Balance the test runners with current test times, longest files first by @alies-dev in #12817
  • CI: Make the perf PR comment and table more readable by @alies-dev in #12922
  • Tests (cleanup): tidy the generator-send merge-order taint test by @alies-dev in #12927
  • Merge 6.x into master by @alies-dev in #12930
  • Parse @template tags with one parser by @alies-dev in #12961
  • [7.x] Perf: compare clause possibilities by assertion key by @alies-dev in #12552
  • Apply the changes queued with the maintainers' Telegram bot every half hour by @danog in #12996
  • Release master and 6.x once a day, not after every merge whose checks pass by @danog in #12997
  • Fix ComplexMethod in BinaryOpAnalyzer::analyze() failing self-analysis by @alies-dev in #13015
  • Push the docker image to ghcr.io/psalm/psalm by @danog in #13045
  • Allow rebuilding a release's docker image by @danog in #13049
  • Fix: Psalm 7 can install psalm/plugin-phpunit 0.19.3, which crashes on test cases by @alies-dev in #13057
  • Keep the targetObject and CheckType fixes through composer build by @danog in #13056

Other changes

  • Fix: unfixable ImmutableDependency on subclasses of Monolog handlers and Reflection classes by @alies-dev in #13047

Full Changelog: 7.0.0-rc27...7.0.0-rc28

Don't miss a new psalm release

NewReleases is sending notifications on new releases.