What's Changed
Features
- Introduce
value-of
with backed enum cases in assertions by @boesing in #9586 - Introduce callable object intersection by @boesing in #9599
- Contextual inference for const callable by @klimick in #9623
- Allow to intersect type alias with non-type-aliases by @boesing in #9638
- Provide support for templated
value-of
enum values by @boesing in #9655 - (re-)implement object-shape assertions by @boesing in #9656
- Support anonymous object template replacement by @klimick in #9664
- Implement unsealed array generic syntax by @danog in #9694
- Introduce BeforeExpressionAnalysisEvent by @tuqqu in #9725
- Add support for @psalm-no-seal-properties and @psalm-no-seal-methods by @robchett in #9681
Fixes
- Fix remaining intl, reflection. xml and zip callmaps by @othercorey in #9595
- fix #9049 by @orklah in #9598
- fix coercion detection between two keyed arrays by @orklah in #9606
- fix: treat includes starting with '.' and '..' correct by @jjjb03 in #9608
- Allow enabling mixed issues reporting for error levels > 2. by @ADmad in #9626
- Preserve
non-empty-string
type when combining literal and numeric strings by @boesing in #9630 - Do not report required closure arguments as unused by @boesing in #9629
- Fix various db callmaps by @othercorey in #9632
- fix: add missing constructor parameter to IteratorIterator by @SenseException in #9646
- Flatten
match
arm conditions to check conditions independently by @tuqqu in #9647 - Fixed non empty arg issue in array_splice function by @whizsid in #9643
- Fix
array_flip
to preserve non-empty array type by @tuqqu in #9651 - Fix list template replacement by @klimick in #9658
- Fix iterable template replacement by @klimick in #9660
- Fix/9373 using enum property as const array key by @ygottschalk in #9393
- Specify array share for
stream_context_get_params
return value by @lptn in #9663 - Fixed crash issue when using multiple literals for array_splice by @whizsid in #9673
- Fix comparison of unions of multiple callables by @danog in #9676
- Add stub for DateInterval by @robchett in #9682
- Return a non-empty-(lowercase-)string from mb_strtolower by @robchett in #9678
- Don't throw UnnecesseryVarAnnotation when hinting a mixed template var by @robchett in #9679
- Fix is_object assertions on final classes by @danog in #9686
- Add return type provider for date/gmdate by @robchett in #9691
- Avoid wrong assertions when working with objects returned by methods by @danog in #9685
- Handle included directory paths without crashing by @edsrzf in #9701
- Contextual closure arg inference for class methods by @klimick in #9700
- Fix #9692 by @danog in #9693
- Allow running new on template objects by @danog in #9704
- Fix date return type provider by @danog in #9711
- Fix UnevaluatedCode false positive at declare(strict_types=1) by @klimick in #9719
- Fix ambiguous constant inheritance false positive by @Jean85 in #9720
Docs
- Add CLI help for the error-level option by @dantleech in #9590
- Replace
@template T as X
with@template T of X
in documentation by @janopae in #9690 - Make it easier to find how to promote Trace by @greg0ire in #9717
- Document @mixin by @robchett in #9706
Internal changes
- Bump mheap/github-action-required-labels from 3 to 4 by @dependabot in #9601
- Avoid verbose opcache logging by @danog in #9670
- Valid array access on a non-empty-string yields a non-empty-string by @robchett in #9675
- Remove clone leftovers from immutable refactoring by @danog in #9709
New Contributors
- @dantleech made their first contribution in #9590
- @jjjb03 made their first contribution in #9608
- @SenseException made their first contribution in #9646
- @tuqqu made their first contribution in #9647
- @whizsid made their first contribution in #9643
- @janopae made their first contribution in #9690
Full Changelog: 5.9.0...5.10.0