1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
Commit Graph

3766 Commits

Author SHA1 Message Date
Matt Brown
b21e138cc7
Allow nested specialisation 2021-01-29 11:47:15 +01:00
Matt Brown
309c13700d
Fix #4769 – don’t use unique ids for new generated nodes 2021-01-29 11:47:15 +01:00
Bruce Weirdan
5bce554cbb
Fix windows builds (#4775)
* Choco now offers PHP 8 only

* Bump build deps to allow PHP 8 builds

* Bump slevomat

* Disable coverage to allow paratest

* Bump dummy project version to allow testing on PHP 8
2021-01-29 11:47:15 +01:00
Matt Brown
326c47ef75
Fix implicit void closure not getting recognised 2021-01-29 11:47:14 +01:00
Matt Brown
73fc7d9491
Fix #4767 - rescan directly-affected class-interface relationships 2021-01-29 11:47:14 +01:00
orklah
48f55f3c3b
Allow int casts if the type comes from calculation (#4768) 2021-01-29 11:47:14 +01:00
Matt Brown
6f598464a9
Mixed array access should mark vars as used just in case 2021-01-29 11:47:14 +01:00
Matt Brown
dd20e838ce
Make more try vars potentially undefined
Fixes #4764
2021-01-29 11:47:14 +01:00
Matt Brown
ba1a076059
Fix interface property regression 2021-01-29 11:47:13 +01:00
Matt Brown
eba91f741b
Fix #4760 - prevent unpacked vars from breaking call when checking unitialised properties 2021-01-29 11:47:13 +01:00
Matt Brown
9c5cc02f90
Fix #4759 – don’t generate assertion when assigning to same-named variable 2021-01-29 11:47:13 +01:00
Matt Brown
1780541501
Ref #4753 - allow int literals to inform key type 2021-01-29 11:47:12 +01:00
Matt Brown
a20db1ce34
Fix #4751 - allow MethodSignatureMismatch to be overridable when info comes from docblock 2021-01-29 11:47:12 +01:00
Matt Brown
c54416090f
Don’t suggest a potential value that’s undefined
Fixes #4754
2021-01-29 11:47:12 +01:00
Matt Brown
f8e22ab7ac
Break out array_key_exists tests 2021-01-29 11:47:12 +01:00
Matt Brown
ace372bfb4
Fix #4752 - add property base assertions too 2021-01-29 11:47:12 +01:00
Matt Brown
7cc0f65f11
Don’t do new isset conversion on try-set vars 2021-01-29 11:47:11 +01:00
Matt Brown
b1996262ba
Ensure that strict empty handling always happens 2021-01-29 11:47:11 +01:00
Matt Brown
2d1222ddec
Fix assertions on unions 2021-01-29 11:47:11 +01:00
Matt Brown
d6b98f2afe
Fix null array access complaints 2021-01-29 11:47:11 +01:00
Matt Brown
06d69ba5f3
Break out RedundantCast issues 2021-01-29 11:47:10 +01:00
orklah
feeaaeb03c
handle return flag for a try/catch/finally (#4746)
* handle return flag for a try/catch/finally

* add tests for psalter
2021-01-29 11:47:10 +01:00
Matt Brown
7206db2cb6
Fix #4705 - clear documenting method ids when scanning stubs 2021-01-29 11:47:10 +01:00
Matt Brown
14040ed1fa
Add failing testcase for #4705 2021-01-29 11:47:10 +01:00
Matt Brown
024bbef5cd
Fix #4743 - simplify assertions generated from array_key_exists check 2021-01-29 11:47:09 +01:00
orklah
5f9aff5734
support shift and bitwise operations in constants (#4740) 2021-01-29 11:47:07 +01:00
orklah
08d9246b9a
improve Atomic Types documentation (#4735)
* improve Atomic Types documentation

* add doc

* add doc
2021-01-29 11:47:07 +01:00
orklah
4ded1080e3
Check from_docblock property to emit the right issue (#4736) 2021-01-29 11:47:06 +01:00
Matt Brown
9789b53617
Fix #4731 - expand out class-bound generic types when evaluating instance method 2021-01-29 11:47:06 +01:00
Matt Brown
8c33bedfca
Fix #4733 - don’t replace template types when they’re defined on the same class 2021-01-29 11:47:06 +01:00
Matt Brown
fb474c2e07
Expand out constants in param types earlier 2021-01-29 11:47:06 +01:00
Matt Brown
ad5ec9501d
Ensure class template types are mapped to static methods where necessary
Ref #4733
2021-01-29 11:47:06 +01:00
Matt Brown
e9ec1b28a2
Simplify storage and retrieval of extended template params 2021-01-29 11:47:05 +01:00
Matthew Brown
cbd8150fde
Add RedundantPropertyInitializationCheck (#4732)
* Add RedundantPropertyInitializationCheck

* add documentation for RedundantPropertyInitializationCheck (#4734)

Co-authored-by: orklah <orklah@users.noreply.github.com>
2021-01-29 11:47:05 +01:00
Matt Brown
a3cf052314
Remove unset thing 2021-01-29 11:47:05 +01:00
Matt Brown
27c303ee39
Detect some erroneous issets 2021-01-29 11:47:05 +01:00
Matt Brown
9fdc56ff75
Fix template type selection 2021-01-29 11:47:04 +01:00
Bruce Weirdan
d13f0b6a7c
Added test to enforce that all supported annotations are documented (#4723)
* Added test to enforce that all supported annotations are documented

Well, at least mentioned.

Refs vimeo/psalm#3816

* Type things

* Make things pretty

* Only check @psalm- annotations, group

* Add documentation for `@psalm-require-extends` and `@psalm-require-implements`

* Dropped logicalOr that has become redundant

* Add explicit tag

* Document @psalm-template

* Add @psalm-template-covariant

* Document `@psalm-method`

* Add list of undocumented docblock annotations

Co-authored-by: Matthew Brown <github@muglug.com>
2021-01-29 11:47:04 +01:00
Matt Brown
5cf5aecb2f
Fix #3017 - use correct keys when converting list to array 2021-01-29 11:47:04 +01:00
orklah
0df867cdff
fix array_column with possibly_undefined keys (#4719) 2021-01-29 11:47:03 +01:00
orklah
b084e2c4bd
add annotation @psalm-param-out (#4717)
* add annotation @psalm-param-out

* add tag in documentation
2021-01-29 11:47:02 +01:00
Matt Brown
3be31563d6
Add complex issue error 2021-01-29 11:46:28 +01:00
Matt Brown
9089f77176
Turn template bound tuples into object
Ref #4714
2021-01-29 11:46:27 +01:00
orklah
45d058c2dd
better fix for reconciling iterable and object (#4712) 2021-01-29 11:46:27 +01:00
Matt Brown
9539c0f27f
Fix generic ArrayAccess creation cc @orklah 2021-01-29 11:46:27 +01:00
orklah
1966766a79
Allow reconciling between object and iterable (#4706)
* Allow reconciling between object and iterable

* add tests
2021-01-29 11:46:27 +01:00
orklah
1511989521
Fix PHPMAXINT offset (#4707) 2021-01-29 11:46:27 +01:00
Matt Brown
ecbb5c77b2
Fix test failures 2021-01-29 11:46:26 +01:00
Matt Brown
033a209950
Treat $a ?? $b identically to isset($a) ? $a : $b 2021-01-29 11:46:26 +01:00
Matt Brown
5228ff6369
Fix #4699 - treat isset like !== null when variable is defined 2021-01-29 11:46:26 +01:00