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

171 Commits

Author SHA1 Message Date
orklah
10c20dc8f3 mark variable used in backticks as used 2021-08-29 00:26:52 +02:00
Bruce Weirdan
6abce3525a
Enforce use sort (#5900) 2021-06-07 22:55:21 -04:00
orklah
69eb8e4999
display PHP version when not understanding an expression (#5268) 2021-02-22 13:15:34 -05:00
orklah
f9fccb2b2d
implement DTO for plugins (#4881)
* implement DTO for plugins

* introduce EventHandler + reintroduce legacy API for plugins
2021-01-06 09:05:53 -05:00
Matt Brown
ff3fff56d4 Simplify assertion negations, centralising as much as possible
Now the flag passed to scrapeAssertions just determines the errors emitted
2020-11-19 14:32:49 -05:00
Matt Brown
a0fbac347e Prevent features pre-php-8 2020-10-14 17:09:56 -04:00
Matt Brown
1a11897849 4.x - add support for the nullsafe operator 2020-10-03 20:21:52 -04:00
orklah
8c7423505a
add native param types (#4137)
* add native param types

* redundant phpdoc

* add more param types and adds "?" to nullable types

* remove redundant phpdoc

* add more param types and remove redundant phpdoc

* add more param types and remove redundant phpdoc
2020-09-06 19:36:47 -04:00
orklah
f66d57f19d
add native return types (#4116)
* add native return types

* remove redundant phpdoc
2020-09-04 16:26:33 -04:00
Brown
54a781ad28 Support match expressions and throw expressions 2020-08-30 16:08:22 -04:00
Brown
8d022307d2 Fix #3797 - prevent many chained assignments crashing Psalm 2020-07-10 16:49:45 -04:00
Brown
559b3d3471 Fix #3681 - taint exit like echo 2020-06-25 17:17:08 -04:00
Brown
b84cf74754 Fix #3668 - taint property types for magic properties without @property 2020-06-25 00:24:37 -04:00
Brown
f609a01497 Move static property fetch analyzer to own class 2020-06-18 11:53:24 -04:00
Brown
10c106f7eb Add eval sink 2020-05-23 00:03:29 -04:00
Brown
5ee1487a01 Make ExpressionAnalyzer more beautiful 2020-05-18 15:13:27 -04:00
SignpostMarv
911ac2d363
Infer numeric-string from (string)$numeric (#3390)
* adding test for vimeo/psalm#3370

* check if typecast will result in numeric-string

* int & float as per examples in vimeo/psalm#3370
* numeric & numeric-string because they shouldn't lose numericness.

* satisfy phpcs

* adjusting assertions to reflect typecasting change
2020-05-18 13:42:47 -04:00
Brown
2af0a17d03 Fix #3236 - allow use-checking of more methods starting with __ 2020-05-12 22:39:26 -04:00
Brown
8f2f2617d4 Improve refactor 2020-05-10 22:45:01 -04:00
Brown
5f4d162dd5 Break out type expander into separate class 2020-05-10 22:39:18 -04:00
Brown
10f3bef743 Fix type check 2020-04-26 20:21:24 -04:00
Brown
e65bffc94f Support intersections with __toString
Fixes #3149
2020-04-26 20:04:41 -04:00
Brown
e9666372d0 Fix coercion 2020-04-22 16:27:43 -04:00
Brown
507f5f4afa Add context-sensitive conversion 2020-04-22 16:08:04 -04:00
Brown
a670aa7ddc Fix #3214 - allow if/else branches of conditional to both be arrays 2020-04-22 16:07:13 -04:00
Brown
aa3846758e Fix #3153 - narrow template types in conditional branches 2020-04-17 09:53:58 -04:00
Brown
633b210a32 Fix test 2020-04-12 21:47:50 -04:00
Matthew Brown
6cea065bca Attempt to export file order in Linux CI 2020-04-05 00:10:50 -04:00
Matthew Brown
4c52032491 Use mixed if yield type not known 2020-04-04 23:54:41 -04:00
Matthew Brown
120595f480 Clone a little earlier 2020-04-04 23:45:38 -04:00
Brown
08594cf712 Always be cloning 2020-04-03 13:56:03 -04:00
Brown
af4a7cabe9 Fix #3057 and add support for @psalm-yield annotation 2020-04-02 22:38:10 -04:00
Matthew Brown
194f02507d Allow conditional types to reference class constants 2020-03-29 13:37:37 -04:00
Matthew Brown
788da0680e Allow var_export userland implementation 2020-03-29 10:19:09 -04:00
Matthew Brown
47c1470e3b Refactor reference checks to use more appropriate properties 2020-03-28 16:30:56 -04:00
Brown
60613462fe Improve static resolution a little more 2020-03-28 08:14:35 -04:00
Brown
5835c34a29 Expand out static extra types 2020-03-28 00:08:31 -04:00
Brown
e3ff856cac Improve treatment of static in intersection 2020-03-27 19:17:44 -04:00
Brown
971ae50bea Do prep work for #3024 - improve handling of absent class references 2020-03-26 12:35:27 -04:00
Brown
1bfc61d402 Allow final classes to bypass static checks 2020-03-24 18:14:10 -04:00
Brown
ec34a16291 Warn about invalid static returns 2020-03-24 18:00:20 -04:00
Matthew Brown
26694345d6 Fix unknown variable 2020-03-21 20:53:46 -04:00
Matthew Brown
6746f1c047 Fix #3004 - reset property types inside a closure defined in a class 2020-03-21 20:46:38 -04:00
Matthew Brown
9cd817077e Improve fix 2020-03-17 17:34:45 -04:00
Matthew Brown
43189b3d55 Allow types to be traversed 2020-03-14 23:54:51 -04:00
Matthew Brown
0aca01faea Improve fix to #2805 2020-03-14 01:09:12 -04:00
Matthew Brown
bfb919d26a Break out methods into their own classes 2020-03-11 23:04:52 -04:00
Matthew Brown
f128c8ffda Fix overriding of mapped property type visibility 2020-03-11 17:41:05 -04:00
Brown
0cfe565d0a Fix #2952 - always be cloning 2020-03-09 18:59:56 -04:00
Matthew Brown
5b7ab6a542 Fix coercion 2020-03-09 01:32:27 -04:00