What's Changed
Deprecations
- Declare
html-escaped-string
is deprecated on doc by @sasezaki in #6582 - deprecate allowPhpStormGenerics by @orklah in #6694
Features
- Flag invalid backing types for enums by @weirdan in #6434
- introducing mysqli execute() method parameter change for php 8.1 by @SMAtaurRahman in #6435
- introducing fsync & fdatasync functions in callmap by @SMAtaurRahman in #6444
- Add mysqli_fetch_column to CallMap by @brayniverse in #6447
- Basic enum checks by @weirdan in #6437
- Add imagecreatefromavif() and imageavif() to CallMap by @brayniverse in #6454
- Always truthy conditions by @orklah in #6476
- Update return type for xdebug_get_profiler_filename() by @ssnepenthe in #6486
- 1> Range arithmetics and assertions by @orklah in #6241
- Add CURLStringFile class by @ishanvyas22 in #6574
- Convert finfo functions to use object instead of a resource by @tomasnorre in #6566
- Convert imap functions to use object instead of a resource by @tomasnorre in #6567
- Add support for advanced IssueHandler in plugins by @gmessier in #6519
- Add possibility to include xml config located in subdirectory by @gmessier in #6516
- Add if-this-is by @danog in #6514
- New annotation: @psalm-if-this-is on methods by @olleharstedt in #3782
- Convert LDAP resources to objects by @tomasnorre in #6570
- 3> min/max, rand inference improvement with integer range by @orklah in #6475
- assert that some type is a list by @orklah in #6485
- Convert PSpell resources to objects by @tomasnorre in #6569
- Psalter psalm-param by @orklah in #6578
- ReflectionClass::getReflectionConstants has a filter parameter by @vaceletm in #6591
- php 8.0 introduced visibility constants on ReflectionClassConstant by @vaceletm in #6595
- feat: Add Fiber stubs by @ishanvyas22 in #6614
- Php-Parser 4.13 by @orklah in #6628
- String unpacking by @orklah in #6613
- stub for is_a by @orklah in #6652
- Added a stub of \ReflectionNamedType by @SCIF in #6667
- Convert pgsql functions to use object instead of a resource by @tomasnorre in #6671
- Added initial support of asserting properties of objects out of scope by @SCIF in #4936
- ftp_pasv is impure by @orklah in #6721
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 argumentcontext
infopen()
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
- change definition of list regarding is_list RFC by @orklah in #6436
- SublimeText configuration by @chynkm in #6459
- Update to Phpstorm support by @ScottAwesome in #6511
- Link type coverage badge to shepherd.dev detail page url by @sasezaki in #6647
- Fix documentation for non-empty-string by @mathroc in #6711
Internal changes
- Prevent failures with dev PHP versions by @weirdan in #6448
- limit PHPParser to 4.12 by @orklah in #6509
- fix build by @orklah in #6526
- code trimming by @orklah in #6532
- Combine types with null argument by @orklah in #6533
- remove unused nullable on param types by @orklah in #6534
- Improvements by @orklah in #6535
- Cleanup by @orklah in #6536
- enable test on taint by @orklah in #6538
- [TASK] Resolve namespace of class related AST statements by @ohader in #5091
- Cleanup by @orklah in #6577
- Lint all *.php files, not only src by @sasezaki in #6587
- cleanup - Remove not used infection.json.dist by @sasezaki in #6599
- Union::getAssertionString with multiple types by @orklah in #6641
- Code trimming by @orklah in #6660
- run CI on PHP 8.1 by @orklah in #6666
- Revert "run CI on PHP 8.1" by @weirdan in #6670
- More tests for
array_merge
andarray_replace
by @ElisDN in #6675 - Remove hasPossiblyNumericType by @orklah in #6693
- skipped tests by @orklah in #6708
- More refactoring around Empty/falsy reconciliation by @orklah in #6714
Typos
New Contributors
- @SMAtaurRahman made their first contribution in #6435
- @50bhan made their first contribution in #6446
- @brayniverse made their first contribution in #6447
- @chynkm made their first contribution in #6459
- @ssnepenthe made their first contribution in #6486
- @MorrisJobke made their first contribution in #6489
- @fluffycondor made their first contribution in #6493
- @SCIF made their first contribution in #6438
- @whsv26 made their first contribution in #6478
- @ScottAwesome made their first contribution in #6511
- @vjik made their first contribution in #6557
- @NikolayZhebet made their first contribution in #6560
- @ishanvyas22 made their first contribution in #6574
- @tomasnorre made their first contribution in #6566
- @vaceletm made their first contribution in #6591
- @Dgame made their first contribution in #6610
- @mathroc made their first contribution in #6711
Full Changelog: 4.10.0...4.11.0