1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-14 18:36:58 +01:00
Commit Graph

5556 Commits

Author SHA1 Message Date
Brown
ec70d6f698 Clear out new_storage classlikes 2020-08-15 15:45:54 -04:00
Matthew Brown
a0bb5ed37d Fix #3991 - fix test 2020-08-15 14:21:24 -04:00
Matthew Brown
8731b10bc6 Use older method 2020-08-15 10:31:24 -04:00
Brown
61a0832c05 Fix type bug 2020-08-15 09:41:21 -04:00
Brown
f12f4c8cb3 Fix issues 2020-08-15 01:18:29 -04:00
Brown
cdef4ec351 Alter docblock params too 2020-08-14 16:26:55 -04:00
Brown
dbcf154036 Add fixer for mismatching param names 2020-08-14 15:25:21 -04:00
Matthew Brown
72ecb57def Improve names of things 2020-08-14 00:27:33 -04:00
Brown
209d17c868 Fix #2891 - treat autoloaded constants better 2020-08-13 09:14:27 -04:00
Brown
42c3a703b5 Fix #3741 - detect scalar class constants in if-true assertions 2020-08-12 17:03:41 -04:00
Brown
966a3522ff Move words 2020-08-11 14:36:59 -04:00
Toshiyuki Goto
22b339304d
Normalize file_path with uriToPath (#3984)
Fix #3983
2020-08-11 07:32:24 -04:00
feek
7fe7146dc3
docs: provide some background as to what certain hooks are for (#3978) 2020-08-11 07:29:45 -04:00
m0003r
e81593f359
Localize types on magic properties (#3971)
* Fix #3949 - localize types on magic properties

* fix failing tests

* fix code style

Co-authored-by: m03r <m03r@m03r.net>
2020-08-10 12:45:21 -04:00
Brown
1533debe86 Fix style thinggs 2020-08-10 12:43:19 -04:00
Brown
6def99d653 Add ConstructorSignatureMismatch issue distinct from MethodSignatureMismatch 2020-08-10 12:26:25 -04:00
the-toster
5bdc9723ff
fix for DeprecatedClass suppress on property (#3962)
* add test case for DeprecatedClass suppress on property

* fix test case for DeprecatedClass suppress on property - suppress MissingConstructor also

* ugly way to fix - double analyze propery statement to get dockblock + fix in TypeChecker - respect given suppressed_issues in checkNamedObject

* replace double analyze propery with direct DocBlock manipulation

* replace double analyze propery with direct DocBlock manipulation

* add exception handler to keep original addContextProperties behavior

* correct way to unwrap value from array
2020-08-10 10:50:37 -04:00
lhchavez
ab3016af6e
Fix File-related analysis plugin hooks (#3970)
This change does a few things:

* Renames `BeforeAnalyzeFileInterface` to `BeforeFileAnalysisInterface`.
* Adds a few more parameters to `BeforeFileAnalysisInterface`.
* Since the analysis was never called due to a bug, the above two
  changes are safe to do.
* Fix the above-mentioned bug, and now adds the hooks to the config.
* Update the documentation about the File-related analysis plugin hooks.
* Add a test to ensure that this does not break again in the future.

Fixes: #3969
2020-08-10 10:49:53 -04:00
Matthew Brown
6085e42fc1 Detect mismatching param names effectively 2020-08-10 09:58:43 -04:00
Matthew Brown
50cc3a8afa Align paramter names 2020-08-09 23:19:59 -04:00
Matthew Brown
73321339a3 Bump nikic/php-parser 2020-08-09 16:23:43 -04:00
kazusuke sasezaki
90a50be9f0
quit using combineUnionTypes, when specific TSend provided. (#3966) 2020-08-09 08:26:10 -04:00
the-toster
3a1c861c43
minor: typo in message (#3960) 2020-08-08 08:08:57 -04:00
Brown
166134aca3 Fix bug I added 2020-08-07 15:13:03 -04:00
ygottschalk
f831ebdbcf
narrowed reset and end return type (#3950)
* narrowed `reset` return type
BUT psalm seems to ignore the stub

* narrowed `reset` and `end` return type, this time for real

* fixed UnusedVariable Issue

* fixed RedundantCondition Issue
caused by `end`s return type being more precise

* Improve solution slightly

Co-authored-by: Matthew Brown <github@muglug.com>
2020-08-07 12:23:20 -04:00
Isaac Rozas García
84130770f4
Improve details of functions to get the last errors parsing a date (#3953) 2020-08-07 12:17:08 -04:00
Brown
b6d9ee5eb1 Fix things 2020-08-07 12:16:35 -04:00
Brown
e61765ff9b Fix #3954 - catch ComplicatedExpressionException with added workaround 2020-08-07 08:20:35 -04:00
Brown
afce2dc66f Tighten up rules around instantiation a bit more 2020-08-06 10:18:55 -04:00
Matthew Brown
ccd4eaa8e7 Clarify language a little 2020-08-06 09:02:24 -04:00
Brown
278addd93d Fix strtolower calls and docs 2020-08-05 21:46:15 -04:00
Brown
bcf0df4170 Fix a bug with lowercase-string unions 2020-08-05 20:05:57 -04:00
Brown
488a899823 Fix Psalm issues 2020-08-05 19:49:09 -04:00
Brown
c0b0036109 Fix #3934 - prevent unsafe use of new static 2020-08-05 19:39:27 -04:00
Brown
e0f5595307 Fix #3932 - try to get assertions of negated expression if instant negation fails 2020-08-05 16:53:30 -04:00
Brown
e808391f56 Fix #3943 - understand trait return types a bit better 2020-08-05 15:58:26 -04:00
Daniel Melchior
fa73c7c9d9
Fix #3757 - allow multiple mixins (#3772) 2020-08-05 15:49:19 -04:00
Brown
38bfc12b98 Fix array_shift behaviour to be more accurate with lists
Fixes #3941
2020-08-05 12:43:37 -04:00
Matthew Brown
9dfdcbef31 Fix #3928 - preserve list-ness when assigning with no offset 2020-08-03 12:30:58 -04:00
SignpostMarv
06d4b9d6dd
mark bcscale as impure, re: vimeo/psalm#3918 (#3926) 2020-08-03 10:15:59 -04:00
Brown
7fc4a85534 Fix CI 2020-08-03 02:45:55 -04:00
Brown
20a9b103ec Restrict narrowing fix 2020-08-03 02:20:58 -04:00
Brown
b168777236 Fix #3924 - remove descendants after reconciled change 2020-08-03 02:06:42 -04:00
Brown
bc053e5ee8 Fix #3923 - remember class name when appending array with key 2020-08-03 01:34:46 -04:00
Brown
855a4b8456 Make type combination of object-like arrays with class-string-keys work
Ref #3923
2020-08-03 01:34:46 -04:00
Nicolas CARPi
593a9063bb
Fix hash_file signature. See https://3v4l.org/E0BeU (#3920)
hash_file can return false if the file is not readable.
2020-08-02 15:18:42 -04:00
Matthew Brown
ab64ccab88 Fix #3913 properly 2020-07-31 14:56:29 -04:00
Matthew Brown
6e699836ff Fix #3913 - improve resolution of array_filter checks 2020-07-31 14:39:03 -04:00
Brown
fd4ced42a7 Don’t register new assignment inside isset expr 2020-07-31 12:44:01 -04:00
Brown
57cd21346c Fix #3914 - treat $i++ like $i = $i + 1 2020-07-31 11:26:54 -04:00