github vimeo/psalm 4.11.0

latest releases: 5.23.1, 5.23.0, 5.22.2...
2 years ago

What's Changed

Deprecations

Features

Fixes

  • Encode XML output consistently by @weirdan in #6433
  • Force array_walk to not infer input type. by @niconoe- in #6441
  • Add an optional $options argument to hash functions for PHP 8.1 by @50bhan in #6446
  • Fix return-type for preg_filter by @tvdijen in #6453
  • type of "$http_response_header" is "list" now by @SMAtaurRahman in #6462
  • Fix #6464: false positive for RecursiveArrayIterator::CHILD_ARRAYS_ONLY by @Jean85 in #6465
  • Print exception class in case of an uncaught exception by @MorrisJobke in #6489
  • Revert mb_str_split return signature to list by @fluffycondor in #6493
  • Fix wrong template type in Sequence::copy() by @simPod in #6494
  • Permit null user_agent to get_browser() by @pawel-slowik in #6502
  • assert object type from instance of with TClassString by @orklah in #6503
  • add PropertyTypeProvider for DomDocument by @orklah in #6505
  • Changed signature of Serializable::unserialize stub by @SCIF in #6438
  • Fix false positive ParadoxicalCondition in negation of in_array by @TysonAndre in #6445
  • Fix invalid argument bug in generic trait context by @whsv26 in #6478
  • Catch ComplicatedExpressionException in ArrayFilterReturnTypeProvider by @MorrisJobke in #6498
  • fixed Uncaught Error: Call to undefined function shell_exec() by @thomasbley in #6508
  • Prevent unnecessary filter_var() warnings on primitive types by @mmcev106 in #6537
  • Update xlswriter signatures by @pawel-slowik in #6545
  • Allow null for argument context in fopen() by @vjik in #6557
  • "Undefined offset: 1" in PLS Psalm/Codebase.php::1473 by @NikolayZhebet in #6560
  • Callmap leak by @orklah in #6553
  • offset the starting position of the function in case of attributes by @orklah in #6552
  • 2> Count equal 0 assertion by @orklah in #6423
  • Show file and line in case of an exception in a forked worker by @MorrisJobke in #6522
  • improvements of alwaysTruthy/alwaysFalsy by @orklah in #6518
  • assert both sides of an equality by @orklah in #6473
  • fix wrong operator priority by @orklah in #6576
  • fix wrong type description added in signature by @orklah in #6580
  • Better understanding of Templates in lhs of callable TKeyedArray by @orklah in #6589
  • fix isAlwaysTruthy: TNonEmptyString can be falsy (with '0') by @orklah in #6585
  • Redundant return type by @orklah in #6590
  • Fix invalid class/method declaration in stub by @sasezaki in #6592
  • revert confusing change by @orklah in #6597
  • Falsable returns by @orklah in #6594
  • fix error by @orklah in #6598
  • foreach on list gives a positive|0 offset by @orklah in #6608
  • Fixed trim-stub by @Dgame in #6610
  • Array unshift on empty array by @orklah in #6604
  • array_is_list on empty array returns true by @orklah in #6612
  • allow any integer range to be satisfied by TNonspecificLiteralInt by @orklah in #6617
  • add a little details to the Incompatible types found for T error by @orklah in #6621
  • fix @return 0 by @orklah in #6622
  • Resolution of unary ops by @orklah in #6635
  • invert the meaning of the errors by @orklah in #6624
  • Templated array key by @orklah in #6623
  • Allow sending possibly_undefined inputs to optional params by @orklah in #6636
  • Refined PDO::errorInfo, PDOStatement::errorInfo by @vudaltsov in #6625
  • Refine TKeyedArray with iterable by @orklah in #6639
  • loose comparison between int/float and string result in numeric-string by @orklah in #6640
  • infer never on closures(and more?) by @orklah in #6643
  • Inside conditional by @orklah in #6642
  • tweaking with loops by @orklah in #6629
  • SimpleXMLElement is not always truthy by @orklah in #6650
  • use Attribute feature of PHP-Parser to avoid dealing with dynamic properties by @orklah in #6656
  • allow Psalm to choose PHP8.1 if it's the lower PHP version allowed by @orklah in #6669
  • Fix @psalm-method annotation parsing by @fluffycondor in #6658
  • prevent phpstorm generics from touching to signature types by @orklah in #6672
  • Fix manipulation of intersection types, arrow functions, foreign static types, parameter static types, T|false|null unions. by @danog in #6654
  • Don't emit InvalidReturnType when return type was inferred to never by @orklah in #6678
  • Improve handling of positive ints by array_filter() by @SCIF in #6679
  • add SimpleXMLIterator to universalObjectCrates by @orklah in #6690
  • improve empty/falsy reconciliation by @orklah in #6684
  • fix missing implicit __toString by @orklah in #6704
  • improve falsy on non-empty-string by @orklah in #6707
  • fix regression for redundant condition when assigning by @orklah in #6715
  • fix Uncaught ValueError: strrpos() by @orklah in #6716
  • only fuse array & Traversable with phpstorm generics by @orklah in #6689
  • fix literal string access on a non empty array by @orklah in #6718
  • Don't refine empty/falsy assertions on templates inside loops by @orklah in #6720
  • Ternary templates by @orklah in #6722

Docs

Internal changes

Typos

New Contributors

Full Changelog: 4.10.0...4.11.0

Don't miss a new psalm release

NewReleases is sending notifications on new releases.