Matthew Brown
4172952e8b
Fix #306 - add support for typing generators
2018-07-13 17:34:44 -04:00
Matt Brown
72b110af3f
Analyse RHS of instanceof expressions if expression
2018-06-27 10:07:40 -04:00
Matt Brown
ffda44c3ba
Fix #838 - check assertions, even outside conditionals
2018-06-25 18:02:05 -04:00
Matt Brown
2be0f68d87
Add better checks on increment/decrement operators
2018-06-18 13:16:51 -04:00
Matthew Brown
89affb6c2c
Fix #822 - improve dead code detection on assignop expressions
2018-06-16 23:40:25 -04:00
Matthew Brown
3670f066bb
Improve dead code detection
2018-06-16 20:01:41 -04:00
Matt Brown
c31d963918
Allow constants in array offsets to be reasoned about
2018-05-31 16:49:01 -04:00
Matthew Brown
c217849737
Improve handling of projects that use include/require heavily
2018-05-22 23:39:01 -04:00
Matthew Brown
228337415b
Fix #761 - add support for class constants in enums
2018-05-21 00:46:56 -04:00
Matthew Brown
ea465852e1
Move TypeCombination logic into its own class
2018-05-19 19:44:03 -04:00
Matthew Brown
b0733254bb
Use individual type objects for each string ( #757 )
...
* Experiment with individual types for each string
* Fix bunch of errors
* Fix a few more issues
* Fix a whole bunch of bugs
* Fix most remaining bugs
* Fix isset warnings
* Fix psalm errors in psalm
* Limit big string size
* Fix falsiness of ints
* Fix issue with type widening, allowing value set in nested if to be altered
* Don’t complain if type is mixed
* Add skipped-for-now test
* Add specific test to address issue
2018-05-18 11:02:50 -04:00
Matthew Brown
ec381308dd
Fix #753 - prevent some strings from becoming literals
2018-05-17 01:46:01 -04:00
Matthew Brown
7dd86efa13
Add support for checking negative values
2018-05-12 18:46:47 -04:00
Matt Brown
ef519ade72
Don’t adjust vars unless they’re passed by ref
2018-05-11 18:09:11 -04:00
Matthew Brown
5c39fb5ab1
Fix #716 - uss string inference to inform property names
2018-05-08 21:21:22 -04:00
Matt Brown
53ff05783c
Clean up code slightly
2018-05-08 17:43:26 -04:00
Matt Brown
4f678f5f99
Fix bad comparisons
2018-05-08 17:42:02 -04:00
Matthew Brown
21261172a8
Fix #713 - support offsets of known array types
2018-05-05 17:30:18 -04:00
Matthew Brown
1a4ddc7cdd
Support value types ( #707 )
...
* Add first idea
* Add initial count experiments
* Remove false positives
* Fix getId to support changes in conditionals
* Add better tests
* Strip types when not exists
* Fix array offsets
* More fixes
* Add class constant value types
* Clone constants everywhere
* Don’t complain unnecessarily
* Be more lenient with possibly invalid __sets
* Fix mixed issues
* Fix bug concerning orred string equality
* Remove unnecessary casts
2018-05-03 13:56:30 -04:00
Matthew Brown
15e1003c37
Warn about impossible empty
2018-04-30 22:13:13 -04:00
Matthew Brown
1946bc0085
Allow resource to be cast to string
2018-04-30 00:19:35 -04:00
Matthew Brown
496256c2a5
Make memoisation more universal
2018-04-28 13:49:21 -04:00
Matthew Brown
048a32e7b6
Also check incremental overflows ref #691
2018-04-24 23:12:01 -04:00
Matt Brown
8d7c365e5f
Fix #679 - improve template param type checks
2018-04-20 10:52:23 -04:00
Matt Brown
6afaf5aae9
Make Psalm compatible with PHP Parser 4
2018-04-17 13:06:02 -04:00
Matt Brown
af63d28b56
isset always returns bool
2018-04-09 10:20:18 -04:00
Matt Brown
cf6326f5e6
Fix #658 - empty always returns bool
2018-04-09 10:19:23 -04:00
Matt Brown
c932ed7764
Fix #651 - allow Psalm to understand assertions on properties of array objects
2018-04-06 16:23:10 -04:00
Matt Brown
fd9e783a37
Emit InvalidDocblock for bad static keyword in @var
...
Ref #623
2018-03-27 11:34:48 -04:00
Matthew Brown
0defe84e01
Allow use of $argv and $argc in function use statements
2018-03-18 17:11:14 -04:00
Matthew Brown
61af2a924c
Fix #575 - generated possibly-undefined keys when scanning objectlike return types
...
Ref #458
2018-03-17 16:53:11 -04:00
Matthew Brown
5cd8b3cccd
Don’t ignore @function calls
...
Fixes #570
2018-03-12 23:48:10 -04:00
Matt Brown
cd521e7ba5
Also flesh out object like array types
2018-03-07 13:54:46 -05:00
Matt Brown
aff689deea
Add support for __CLASS__ in template types
2018-03-05 17:36:08 -05:00
Matt Brown
441506ad6f
Fix #216 - scan assert* functions for assertions, then apply to current context
2018-02-23 15:39:33 -05:00
Tyson Andre
aea3779c96
Fix unused imports in psalm, wrong param order doc comments ( #523 )
...
(Some of the imports appear as strings elsewhere in the same file)
2018-02-18 17:55:11 -05:00
Matthew Brown
88ca7d2fa7
Fix #515 - make Psalm aware of variable array keys
2018-02-17 11:24:08 -05:00
Matthew Brown
affcaebc3d
Use classes, not full method ids, for plugin execution
2018-02-11 22:49:19 -05:00
Matthew Brown
e862e4ddb1
Make all plugin methods static
...
cc @TysonAndre
2018-02-11 20:56:34 -05:00
Matthew Brown
6955f77e2e
Fix #493 - add support for multiple @var lines per docblock
2018-02-07 23:33:31 -05:00
Matthew Brown
1ae58f0386
Fix #501 - allow analysis to continue after bad constant check
2018-02-07 20:26:26 -05:00
Matthew Brown
fb300baa6d
Move a bunch of code into Codebase
2018-02-01 00:50:01 -05:00
Matthew Brown
e0fa3adb6f
Split up CallChecker to speed up Psalm
2018-01-28 18:29:38 -05:00
Matthew Brown
44b8b22995
Improve checks for unused variables and params
2018-01-28 17:28:34 -05:00
Matthew Brown
dd32452d90
Remove more dead code found by Psalm
2018-01-28 12:43:19 -05:00
Matt Brown
a2d11cce51
Fix static/self return type handling
2018-01-26 13:51:00 -05:00
Matt Brown
543872f186
Allow @psalm-ignore-falsable-return annotation
...
Downgrades issues around use of current(), reset(), end() etc.
2018-01-24 18:52:58 -05:00
Matthew Brown
68b00ea49a
Add automatic fix for PossiblyUndefinedVariable
2018-01-21 16:24:20 -05:00
Matthew Brown
bc9761f6c9
Create Codebase out from ProjectChecker
2018-01-21 13:45:33 -05:00
Matthew Brown
bd6e4a09bd
Refactor to break up too-large-files
2018-01-14 12:09:40 -05:00