1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 09:47:29 +01:00
Commit Graph

310 Commits

Author SHA1 Message Date
Matt Brown
a887d09ca9 Fix #867 - make some system constant types more broad 2018-07-06 13:35:36 -04:00
Matthew Brown
6090355241 Add possible fix for unevaluated classlikes 2018-07-04 14:32:58 -04:00
Matthew Brown
16e270f0ee Improve loading of stub file and autoload file information
Ref #849
2018-06-30 15:29:37 -04:00
Matthew Brown
ce1fda46a6 Fix hard-to-resolve constant values 2018-06-27 21:53:25 -04:00
Matthew Brown
e3ae1bf26f Fix #15 - check for uncaught throws if config flag is set 2018-06-22 01:13:49 -04:00
Matthew Brown
fa51c39902 Improve dead code analysis of switch statements 2018-06-16 21:54:44 -04:00
Matthew Brown
3670f066bb Improve dead code detection 2018-06-16 20:01:41 -04:00
Matthew Brown
dfc32216b3 Fix #800 - treat array access offsets as mixed for reconciliation purposes 2018-06-08 09:31:21 -04:00
Matthew Brown
55fdef250e Add config to allow hoisting constants to the top of a file 2018-06-01 09:07:22 -04:00
Matt Brown
c31d963918 Allow constants in array offsets to be reasoned about 2018-05-31 16:49:01 -04:00
Matthew Brown
72f65cf544 Fix global tests 2018-05-30 22:56:46 -04:00
Matthew Brown
6b8e019a07 Bleed global variables declared in functions into main context 2018-05-30 22:09:46 -04:00
Matthew Brown
33a38113f3 Fix isset check 2018-05-30 20:54:03 -04:00
Matt Brown
549e90eca4 Treat required files the same as the files that require them, reporting-wise 2018-05-30 16:19:18 -04:00
Matthew Brown
c217849737 Improve handling of projects that use include/require heavily 2018-05-22 23:39:01 -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
Matt Brown
3119a1f68a Allow resolution of class constants in const arrays 2018-05-14 17:39:08 -04:00
Matthew Brown
7dd86efa13 Add support for checking negative values 2018-05-12 18:46:47 -04:00
Matt Brown
92bb22ccca Fix misfire with similarly named class constants 2018-05-10 14:12:50 -04:00
Matt Brown
444dd33118 Fix issue with undefined class constant keys 2018-05-10 13:01:55 -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
fa95dede08 Fix #455 - allow unset to alter object-like arrays 2018-05-02 19:39:11 -04:00
Matt Brown
6afaf5aae9 Make Psalm compatible with PHP Parser 4 2018-04-17 13:06:02 -04:00
Radosław Kowalewski
15c1a82d8c Few fixes to make tests pass on windows
* changed / to DIRECTORY_SEPARATOR in expected messages
* cahnged most occurences PHP_EOL to "\n" in tests and src
* added output buffering in test to avoid marking test as risky
2018-04-12 22:41:13 -04:00
Matt Brown
60c6bb4021 Fix #650 - be more judicious about inserting mixed into places 2018-04-06 18:28:22 -04:00
Matthew Brown
871a91c850 Add debug-by-line option 2018-03-26 09:08:55 -04:00
Matthew Brown
025b7049fd Allow $argv/$argc to be accessed from namespace 2018-03-18 10:38:08 -04:00
Matthew Brown
28522c4f94 Fix #588 - allow anonymous classes to call $this functions 2018-03-18 01:07:14 -04:00
Matthew Brown
eb3750d8f3 Remove unnecessary @var annotations 2018-03-17 00:19:55 -04:00
Matt Brown
57c2adb923 Fix #558 - add extra tests around functionality 2018-03-05 17:10:52 -05:00
Matt Brown
850998ed1a Add class-string type for enforcing use of ::class constants 2018-03-05 16:06:06 -05:00
Matthew Brown
9fe4a97851 Fix issue with do 2018-03-03 13:21:52 -05:00
Matthew Brown
e419a8fe01 Exit early when there’s an issue in block-level elements
Fixes #550
2018-03-03 13:20:41 -05:00
Matthew Brown
115e647c3c Fix #543 - register static vars properly so their references can be caught 2018-02-26 19:32:26 -05:00
Matthew Brown
956972b4a4 Fix #539 - evaluate global variable usage 2018-02-25 10:43:54 -05:00
Matt Brown
5471b89391 Make array coercion an error 2018-02-21 18:59:31 -05:00
Matthew Brown
108ca54867 Fix #516 - make sure --find-references-to doesn’t output missing references 2018-02-17 17:45:30 -05:00
Matthew Brown
c87204acbf Don’t check for unused vars when checking for initialiasations
Fixes #517
2018-02-17 12:02:31 -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
24416feb62 Improve handling of unset calls with possibly undefined variables 2018-02-10 10:30:08 -05:00
Matt Brown
6f7903716d Move property lookup api into codebase class 2018-02-08 18:14:28 -05:00
Matthew Brown
6955f77e2e Fix #493 - add support for multiple @var lines per docblock 2018-02-07 23:33:31 -05:00
Matt Brown
1d46124bab Fix issues found by detecting docblock type inconsistencies 2018-02-06 13:40:28 -05:00
Matthew Brown
473a174f23 Memoise type tokenisation and move functions to more logical locations 2018-02-04 12:23:32 -05:00
Matthew Brown
8e0998e081 Break apart the Codebase class 2018-02-03 18:56:54 -05:00
Matthew Brown
44b8b22995 Improve checks for unused variables and params 2018-01-28 17:28:34 -05:00
Matt Brown
a2d11cce51 Fix static/self return type handling 2018-01-26 13:51:00 -05:00
Matthew Brown
ea28ee709d Improve unused variable detection slightly 2018-01-25 01:04:26 -05:00