github vimeo/psalm 7.2.1

34 minutes ago

What's Changed

Fixes

  • fix(traits): a visibility a trait gives to the methods it uses from another trait reaches its class #6025 by @jirkace in #13276
  • fix(new-static): do not report UnsafeInstantiation for a class implementing an interface with a constructor #6481 by @jirkace in #13265
  • fix(operands): don't report ** of different numeric types in strict operands mode by @jirkace in #12638
  • fix(statements): analyse an interface or an enum declared in another statement by @jirkace in #13129
  • fix(assertions): inherit assert-if-true/false from an overridden method and resolve static to the called class #6164 by @jirkace in #13283
  • fix(traits): ignore type arguments of require-extends and require-implements by @jirkace in #12955
  • fix(arrays): keep a list a list when a nested item of it is written through its own key by @jirkace in #12647
  • fix(assertions): bool variable identity with true/false keeps its assignment clauses by @jirkace in #12772
  • feat(property_exists): type property_exists() of a declared property as true so redundant checks are reported #10436 by @jirkace in #13284
  • fix(analysis): check property initialisation at every constructor return by @jirkace in #13085
  • Do not report a non-empty-array assertion on a possibly empty array as redundant by @jirkace in #13310
  • Do not report a paradox between the conditions of one match arm by @jirkace in #13311
  • Do not treat the value of a CLI option as a path to check by @jirkace in #13321
  • Do not require every key of a literal union after array_key_exists by @jirkace in #13317
  • Use the class of an intersection that declares the property by @jirkace in #13320
  • Narrow after a negated instanceof static by @jirkace in #13312
  • fix(reconciler): a variable holding one literal key is that key for empty() by @jirkace in #13366
  • fix(closure): capturing an undefined variable by reference is not an undefined variable by @jirkace in #13363
  • feat(stubs): add the constants of the curl, ldap and openssl extensions by @jirkace in #13349
  • fix(loop): link the data flow of the last loop pass to the reads of the first by @jirkace in #13343
  • Infer a template from a class-string bounded template input by @jirkace in #13331
  • Fix InternalClass and InternalProperty not reported outside classes by @roxblnfk in #13137
  • [7.x] Cut ~280 MB per forked worker's taint graph by unserializing paths without a property table by @jarstelfox in #13080
  • fix(enums): value-of<> of a constant of an enum resolves the constant by @jirkace in #13300
  • Cast the index column of array_column to array keys by @jirkace in #13313
  • fix(algebra): a condition is paradoxical when all the clauses of its negation are implied by @jirkace in #13358
  • fix(traits): follow a method of a nested trait when checking what a constructor sets by @jirkace in #12673
  • fix(inheritance): check omitted optional parameters of interfaces, accept variadic parameters by @jirkace in #13095
  • Fix --init error level for paths containing vendor or stub by @MohannadElemary in #13338
  • Falsy nullsafe call result no longer makes its receiver null (#6237, #6717) by @jirkace in #12739
  • Honour the visibility of a trait alias when following constructor calls by @jirkace in #13319
  • fix(cli): don't print git's stderr when collecting source control info by @jirkace in #13417
  • fix(assignment): nested write to an existing list offset keeps the list by @jirkace in #13408
  • fix(call): @param-out template is not widened by the argument's own type by @jirkace in #13426
  • fix(templates): resolve the own templates of an implemented template argument at the call by @jirkace in #13400
  • fix(templates): get_class($x) binds a class-string template to the class of $x by @jirkace in #13378
  • fix(magic-get): call __get with the property name as written, not as a string literal by @jirkace in #13397
  • fix(cast): string cast of an intersection uses the narrowest __toString by @jirkace in #13421
  • fix(language-server): the quick fix for an issue inserts the suppression instead of rewriting the line by @jirkace in #13383
  • fix(loops): break N tells the outer loop it targets about the break by @jirkace in #13376
  • fix(config): an issue named twice in the issueHandlers keeps what both elements say by @jirkace in #13404
  • fix(docblock): trailing semicolon after a parameter name by @jirkace in #13410
  • [7.x] Cut forked taint runs ~40% (700 s to 413 s) by serializing taint nodes with an index into a list of locations by @jarstelfox in #13074
  • fix(ternary): keep variables assigned in every branch of a nested ternary or match by @jirkace in #13395
  • fix(docblock): a TypeParseTreeException in a @mixin / @psalm-require-* type is an issue, not a crash by @GBra-4-669 in #13158
  • fix(array-fetch): a missing literal key in isset/?? no longer makes the fetch mixed by @jirkace in #13427
  • Forget the issues of the old body of a method whose body got shorter by @jirkace in #13476
  • fix(templates): resolve the other templates a constraint names when new leaves a template unbound by @jirkace in #13090
  • fix(static-props): static::$x is not the same variable as self::$x by @jirkace in #13364
  • fix(assertions): say "empty array" when an array is compared with [] by @jirkace in #12652

Docs

Internal changes

Other changes

  • fix(templates): equality bounds that are type variables of the same type are one type by @jirkace in #13403
  • fix(plugins): FunctionCasingChecker and trait aliases by @jirkace in #13416

New Contributors

Full Changelog: 7.2.0...7.2.1

Don't miss a new psalm release

NewReleases is sending notifications on new releases.