1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-14 02:07:37 +01:00
Commit Graph

846 Commits

Author SHA1 Message Date
Matt Brown
61e374f33b Fix null array access complaints 2020-12-01 20:10:48 -05:00
orklah
b60c42adca
improve Atomic Types documentation (#4735)
* improve Atomic Types documentation

* add doc

* add doc
2020-11-29 21:41:36 -05:00
Matt Brown
ea314cc1c0 Simplify calling of replacer methods 2020-11-29 16:27:00 -05:00
Matt Brown
4d22723525 Break out replacement of templated types with their inferred result 2020-11-29 16:16:16 -05:00
Matt Brown
15a5bd5e29 Simplify storage and retrieval of extended template params 2020-11-29 15:05:32 -05:00
Matthew Brown
60ac109c01
Add RedundantPropertyInitializationCheck (#4732)
* Add RedundantPropertyInitializationCheck

* add documentation for RedundantPropertyInitializationCheck (#4734)

Co-authored-by: orklah <orklah@users.noreply.github.com>
2020-11-29 11:57:20 -05:00
Matt Brown
0efd4ebd7d Detect some erroneous issets 2020-11-29 09:26:39 -05:00
Matt Brown
5f065d3d74 Turn template bound tuples into object
Ref #4714
2020-11-27 11:43:30 -05:00
orklah
f7cfdaabd7
Allow reconciling between object and iterable (#4706)
* Allow reconciling between object and iterable

* add tests
2020-11-26 09:25:49 -05:00
Matt Brown
01ceaf7006 Fix style issues 2020-11-25 21:36:37 -05:00
Matt Brown
0c477da310 Fix test failures 2020-11-25 20:05:09 -05:00
orklah
b6a3282589
Detect redundant cast (#4695)
* detect redundant cast

* fix redundant cast issues

* fix redundant cast in tests
2020-11-25 12:04:48 -05:00
Matt Brown
39f26d9047 Remove suppressed issuue 2020-11-25 09:22:41 -05:00
Matt Brown
0d0ed8be15 Fix slash 2020-11-22 09:04:44 -05:00
Matt Brown
66d574b82e Fix #4475 - verify that used attributes actual use the Attribute attribute 2020-11-22 00:52:56 -05:00
Matt Brown
6b1112e6ea Fix #4653 - prevent crash with recursive type in root namespace 2020-11-22 00:26:14 -05:00
Matt Brown
baca927aab Fix #4643 - use PHP8 union types when possible 2020-11-21 22:50:56 -05:00
Matt Brown
f0ae0e5cb4 Break aparat type combiner 2020-11-21 18:11:29 -05:00
orklah
f21f6f40e5
return string in phpdoc for a literal class-string (#4652) 2020-11-21 17:42:53 -05:00
orklah
98370b65d7
avoid formating useless type (#4651) 2020-11-21 17:42:26 -05:00
orklah
509a937d1b
use int|string in phpdoc format for array-key (#4645) 2020-11-21 17:38:40 -05:00
Matt Brown
67478949c2 Allow mixed in PHP 8 for manipulation 2020-11-20 18:53:48 -05:00
orklah
6b72599ec5
allow static return type in PHP8 (#4641) 2020-11-20 18:46:35 -05:00
orklah
e04f219948
return static instead of self when static context detected (#4632)
* return this instead of self when static context detected

* replace $this by static
2020-11-19 19:02:25 -05:00
Matt Brown
78d644d1a1 Change TaintedText to TaintedCallable 2020-11-19 19:01:19 -05:00
Lukas Reschke
78f4a0691c
Add dedicated types for 'file', 'header' and 'cookie' (#4630)
* [WIP] Add dedicated sinks for 'file', 'header' and 'cookie'

* Add documentation

* Add mapping for taint flows

* Add tests

* Fix test
2020-11-19 17:47:29 -05:00
Matt Brown
7c02fa76d1 Fix #4620 - reconciled literal strings cannot carry taints 2020-11-19 09:06:25 -05:00
Lukas Reschke
ddbfbb28e6
Split LDAP into custom category (#4604)
- Adds ldap_escape as sanitizer
- Defines the right parameters to ldap_search as sink
- Wrote documentation
- Added tests
2020-11-18 11:39:36 -05:00
Lukas Reschke
5ba4681c17
Add SSRF sinks (#4592) 2020-11-18 00:52:48 -05:00
Matt Brown
43af3b1a57 Break out TaintedInput issues into a lot of separate ones 2020-11-17 12:44:31 -05:00
Matt Brown
67f9853756 Preserve reconciled taints for all but non-string scalar types 2020-11-08 10:27:58 -05:00
Matt Brown
3bde327f1b Break up CommentAnalyzer 2020-11-04 23:25:08 -05:00
Matt Brown
3e9c5d3600 Add support for @return never 2020-11-04 12:30:02 -05:00
Matt Brown
b35db3e523 Reorganise things a little 2020-11-03 16:15:54 -05:00
Matt Brown
4ea87b9054 Add support for int-mask<...> and int-mask-of<...> 2020-10-30 13:28:45 -04:00
Matt Brown
dab1aac9d4 Protect more calls 2020-10-28 13:48:13 -04:00
Matt Brown
8dd5dc5b72 Improve algebra handling a little better 2020-10-26 16:34:56 -04:00
Matt Brown
18f3a3721f Fix #4414 - allow multiple @psalm-assert-if-true on same var 2020-10-25 10:49:39 -04:00
Matt Brown
5ff3f1377d Fix a few bugs 2020-10-24 12:23:59 -04:00
Matt Brown
add3feeaf8 Add null check 2020-10-24 11:37:08 -04:00
Matt Brown
a832d77d73 Add logic to weed out unnecessary clauses 2020-10-24 11:31:36 -04:00
Matt Brown
1c836ad2fb Invalidate signature types when use changes 2020-10-22 18:07:27 -04:00
Matt Brown
b1e2e30026 Only show interesting array intersections 2020-10-20 09:40:17 -04:00
Matt Brown
27fcf6e163 Revert change to array shape display 2020-10-20 09:36:38 -04:00
Matt Brown
234896c73a Fix #4371 - improve display of intersection arrays 2020-10-20 09:10:41 -04:00
Matt Brown
d462a94661 Prevent dupe records 2020-10-18 01:01:57 -04:00
Matt Brown
60ae4a29da Improve error messaging 2020-10-18 00:44:21 -04:00
Matt Brown
0897abf5cb Be more explicit about negation 2020-10-18 00:39:43 -04:00
Matt Brown
055fe551c1 Suppress errors from fake statements 2020-10-17 18:35:55 -04:00
orklah
ceaaa39ec3
improve phpdoc (#4352) 2020-10-17 12:36:44 -04:00