1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 12:24:49 +01:00
Commit Graph

204 Commits

Author SHA1 Message Date
Matt Brown
051169f9f2
Fix #5097 - memoise more things during null coalesce 2021-01-29 11:47:37 +01:00
Matt Brown
0107afb2fb
Fix #5025 - prevent crash in assert function during reflection 2021-01-29 11:47:33 +01:00
Matthew Brown
3322ffb3f0
Fix #4912 - detect mismatching property type 2021-01-29 11:47:24 +01:00
Matt Brown
972738b772
Add test for #4825 2021-01-29 11:47:19 +01:00
Matt Brown
4b0fe42a05
Union types if stmt already has one 2021-01-29 11:47:19 +01:00
Matt Brown
e1e0c20861
Fix get magic property checks 2021-01-29 11:47:19 +01:00
Matt Brown
b15384bbff
Tighten up rules arouund when mutation-free methods get memoised 2021-01-29 11:47:18 +01:00
Matt Brown
a5408aafc9
Fix #4778 - remove already-initialized properties when checking initialisation 2021-01-29 11:47:16 +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
06d69ba5f3
Break out RedundantCast issues 2021-01-29 11:47:10 +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
8392fb429c
Fix #4540 - use correct method when simulating property setting 2021-01-29 11:46:09 +01:00
feek
d1b7cf6860
feature: ensure universal object crate class exists (#4375) 2021-01-29 11:41:13 +01:00
orklah
62861e79d8
improve phpdoc (#4352) 2021-01-29 11:39:57 +01:00
feek
a19f738967
feature: universal object crates (#3948)
* feature: universal object crates

* docs: document universal object crate config option

Co-authored-by: Matthew Brown <github@muglug.com>
2021-01-29 11:39:48 +01:00
Matt Brown
510f1e75cd
Promoted properties are always initialized 2021-01-29 11:39:45 +01:00
Matt Brown
613ce96582
Support property type promotion ref #4089 2021-01-29 11:39:45 +01:00
Brown
c0bf0a8fa7
Fix #4198 - make analysis of class-string property assignments more robust 2021-01-29 11:39:39 +01:00
Brown
168972e91a
Fix #4178 - always detect missing property types 2021-01-29 11:39:36 +01:00
orklah
db45ff1ba4
More return types (#4173)
* add native return types

* redundant phpdoc
2021-01-29 11:38:57 +01:00
Brown
e5aae7f9e6
Support PHP 8 union types 2021-01-29 11:38:49 +01:00
Brown
c96ba8d1f5
Add some backwards-incompatible changes for 4.x 2021-01-29 11:38:48 +01:00
Bruce Weirdan
1cc4715740
Fix windows tests (#4040)
* Fix windows tests by not mangling the expectations

* Use platform-dependent directory separator in expected messages

* fix CS
2021-01-29 11:38:04 +01:00
Brown
c0b0036109 Fix #3934 - prevent unsafe use of new static 2020-08-05 19:39:27 -04:00
Brown
b168777236 Fix #3924 - remove descendants after reconciled change 2020-08-03 02:06:42 -04:00
Brown
fd4ced42a7 Don’t register new assignment inside isset expr 2020-07-31 12:44:01 -04:00
Brown
23f5d66516 Fix #3897 - support aliasing final methods 2020-07-26 14:46:52 -04:00
Matthew Brown
ab714a40c4 Allow binding of static to current final class
Ref #3892
2020-07-25 17:26:07 -04:00
Brown
6bdff42cda Add support for potentially-assigned properties 2020-07-08 11:46:55 -04:00
Brown
f72b609d42 Fix #3642 - detect missing property when name matches 2020-06-23 13:12:46 -04:00
Brown
8a0776c8e5 Fix tests 2020-06-11 12:19:34 -04:00
Brown
db67be5965 Fix #3483 - analyse variable static property access properly 2020-05-29 09:28:34 -04:00
Matthew Brown
1b752d06ab Fix #3201 - add additional constraints on constructor initialisation 2020-04-21 00:04:47 -04:00
Brown
2d4381eb4e Fix #3096 - forget clauses in context after call 2020-04-08 01:03:37 -04:00
Brown
99549871b6 Fix tests 2020-04-06 18:16:14 -04:00
Matthew Brown
c986cdf12e Allow edge-case of by-reference assignment with unitiliazed property
Fixes #3003
2020-03-21 19:23:32 -04:00
Matthew Brown
c85fa9083d Fix #2915 - prevent "if (true)" and similar 2020-03-15 22:23:31 -04:00
Matthew Brown
a2a507166d Fix #2923 - remove hack to fix a template issue 2020-03-06 09:42:23 -05:00
Matthew Brown
b3f6b56f9c Add support for @psalm-readonly-allow-private-mutation 2020-02-02 15:56:08 -05:00
Matthew Brown
ba8eb264d4 Fix test 2020-02-02 15:37:37 -05:00
Matthew Brown
93fc1b1cc7 Fix #2729 - allow mutation of otherwise-readonly properties 2020-02-02 15:35:12 -05:00
Pavel Batečko
ecf85aef12
Add generic definition of DOMNamedNodeMap (#2703)
* Fix #2638 - propagate phantom classes to recursive calls to Scanner::queueClassLikeForScanning()

* Add generic definition of DOMNamedNodeMap
2020-01-29 08:39:07 -05:00
Brown
e68ca6a20b Fix #2661 - catch invalid array_push on property 2020-01-22 09:57:59 -05:00
Matthew Brown
2f2cd85a6a Identify invalid static property array assignment 2019-12-27 10:34:51 -05:00
Matthew Brown
4052e6dfac Allow isset to check for property initialisation
Ref #2382
2019-11-28 09:12:17 -05:00
Matthew Brown
dc0dd08a67 Fix test 2019-10-29 19:46:36 +00:00
lhchavez
216f991b0c Normalize stringified type names (#2239)
This change makes stringified types more normalized. Concretely it sorts
all union types, reconciled types, and sorts the keys within object-like
types.
2019-10-17 01:14:33 -04:00