Matt Brown
ff5ea32ea3
Fix #277 - infer stdClass from object cast
2017-11-09 15:58:09 -05:00
Matthew Brown
765d82548d
Remove more dead code
2017-11-08 23:27:51 -05:00
Matt Brown
e0371aed62
Introduce file manipulation concept to plugins
2017-11-07 14:46:53 -05:00
Matthew Brown
45df0292b1
Never constrain by-ref array variables
2017-10-28 15:33:29 -04:00
Matt Brown
c850ef644d
Add PossiblyFalseReference and PossiblyFalseArgument issues
...
Useful for catching error cases
2017-10-23 11:47:00 -04:00
Matthew Brown
f6e01b5925
Change empty type assertions to "falsy"
...
As empty has a special meaning
2017-10-22 11:57:41 -04:00
Matthew Brown
1b7a5c2944
Fix #236 - incorrect operand issue text
2017-10-12 08:51:57 -04:00
Matthew Brown
862d22e83c
Fix #230 - invalidate root vars on $arr[]= assignment
2017-10-10 23:01:52 -04:00
Matthew Brown
beea51d7bf
Fix property check
2017-10-07 15:05:05 -04:00
Matthew Brown
9774131876
Fix #224 - explicit string casts fail when no __toString present
2017-10-07 11:27:54 -04:00
Matthew Brown
6b4bd47ddb
Fix #181 and #225 - resolve problems with self in comments/return statements
2017-10-07 10:22:52 -04:00
Matt Brown
6f911c7386
Emit more specific operand issues
2017-09-20 11:22:17 -04:00
Matt Brown
5b3531b5a5
Fix null coalescing on nullable output
2017-09-13 14:35:42 -04:00
Matthew Brown
e89a2929d5
Infer types from numeric operations
2017-09-06 21:44:26 -04:00
Matthew Brown
9f9e8a1b30
Improve API for inference
2017-09-03 20:52:54 -04:00
Matthew Brown
11aa3558b7
Make sure encapsulated strings can also coerce param types
2017-09-02 19:48:59 -04:00
Matthew Brown
a0c27cee4f
Allow param types to be inferred from presence of concat ops
2017-09-02 19:23:00 -04:00
Matthew Brown
4175295113
Isolate where we load static storage objects ( #195 )
...
* Move FileChecker::$storage calls to provider
* Add ClassLikeStorageProvider
* Use ClassLikeStorageProvider everywhere
* Move storage arrays into providers
2017-07-29 15:05:06 -04:00
Matthew Brown
e29dd140e3
Refactor scanning and analysis, introducing multithreading ( #191 )
...
* Add failing test
* Add visitor to soup up classlike references
* Move a whole bunch of code into the visitor
* Move some methods back, move onto analysis stage
* Use the getAliases method everywhere
* Fix refs
* Fix more refs
* Fix some tests
* Fix more tests
* Fix include tests
* Shift config class finding to project checker and fix bugs
* Fix a few more tests
* transition test to new syntax
* Remove var_dump
* Delete a bunch of code and fix mutation test
* Remove unnecessary visitation
* Transition to better mocked out file provider, breaking some cached statement loading
* Use different scheme for naming anonymous classes
* Fix anonymous class issues
* Refactor file/statement loading
* Add specific property types
* Fix mapped property assignment
* Improve how we deal with traits
* Fix trait checking
* Pass Psalm checks
* Add multi-process support
* Delay console output until the end
* Remove PHP 7 syntax
* Update file storage with classes
* Fix scanning individual files and add reflection return types
* Always turn XDebug off
* Add quicker method of getting method mutations
* Queue return types for crawling
* Interpret all strings as possible classes once we see a `get_class` call
* Check invalid return types again
* Fix template namespacing issues
* Default to class-insensitive file names for includes
* Don’t overwrite existing issues data
* Add var docblocks for scanning
* Add null check
* Fix loading of external classes in templates
* Only try to populate class when we haven’t yet seen it’s not a class
* Fix trait property accessibility
* Only ever improve docblock param type
* Make param replacement more robust
* Fix static const missing inferred type
* Fix a few more tests
* Register constant definitions
* Fix trait aliasing
* Skip constant type tests for now
* Fix linting issues
* Make sure caching is off for tests
* Remove unnecessary return
* Use emulative parser if on PHP 5.6
* Cache parser for faster first-time parse
* Fix constant resolution when scanning classes
* Remove test that’s beyond a practical scope
* Add back --diff support
* Add --help for --threads
* Remove unused vars
2017-07-25 16:11:02 -04:00
Matthew Brown
bc35f88859
Fix issue with $this instanceof checks in traits
2017-06-23 00:39:37 -04:00
Matt Brown
e5c25eae97
Fix #172 - make sure new coalesce vars escape brackets
2017-06-20 15:38:32 -04:00
Matt Brown
e1d5eab7a2
Fix long line
2017-06-20 14:07:54 -04:00
Matt Brown
473040ca8f
Fix #171 by supporting exit statements for fopen
2017-06-20 13:25:37 -04:00
Matthew Brown
93e7486d5e
Reduce line length
2017-05-26 20:17:56 -04:00
Matthew Brown
22a716f4da
Improve formatting of phpdocs
2017-05-26 20:16:18 -04:00
Matthew Brown
d6909193ea
Add additional formatting changes
2017-05-26 20:05:57 -04:00
Matthew Brown
688a72c794
Fix #36 - emit issues on deprecated properties
2017-05-25 01:32:34 -04:00
Matthew Brown
4fd46e1752
Improve formatting
2017-05-24 22:07:49 -04:00
Matthew Brown
7532e32b9d
Fixed spacing and use statement formatting
2017-05-19 00:48:26 -04:00
Matt Brown
cadaef14e6
Carry forward ignore_nullable_return in fleshOutType
2017-05-10 12:49:59 -04:00
github@muglug.com
9ff8736e53
Add the means to ignore PossiblyNull* errors from the type itself
2017-05-09 16:38:58 -04:00
Matt Brown
9cabf428c4
Only make isset $this->property mixed if not already defined
2017-04-28 16:41:54 -04:00
Jon Ursenbach
f65c618b2e
PSR-2 adjustments and adding PHPCS checks into the Travis config. ( #149 )
...
* PSR-2 adjustments and adding PHPCS checks into the Travis config.
* Reverting some CallChecker changes and no longer casting vars to null.
2017-04-28 00:31:55 -04:00
Matt Brown
bd6a623bfd
Fix possible empty type when inferredType not set
2017-04-21 16:33:18 -04:00
Matt Brown
f7daa6e768
Fix #143 by allowing scalar types to be passed through
2017-04-21 14:06:47 -04:00
Matthew Brown
2bdd062400
Ternary else should ignore if expression context
2017-04-15 13:46:18 -04:00
Vladimir Komissarov
818e3be00c
Fix undefined global constant in closure
2017-04-14 17:03:09 +07:00
SignpostMarv
46a0b03aac
enable the exposure of the source line number when DocblockParseException is thrown
2017-04-11 22:14:15 +01:00
Matthew Brown
40427839ea
Get all variables possibly assigned in conditional
2017-04-06 22:56:37 -04:00
Matthew Brown
20b0460a33
Fix #123 - ternary byref vars now adjusted
2017-04-06 21:53:29 -04:00
Matthew Brown
075cc5f50d
Add by-reference clause removal
2017-04-02 17:37:56 -04:00
Matt Brown
5b34163d8d
Add ability to insert suppressed issues on functions
2017-03-31 11:21:34 -04:00
Matthew Brown
066b1e011e
Prevent creating empty objectlike
2017-03-20 02:05:58 -04:00
Matthew Brown
cb2ed860fb
Make sure to invalidate clauses in all parent contexts when asserting
2017-03-18 15:24:14 -04:00
Matthew Brown
c33e66813a
Move type algebra functionality to separate checker
2017-03-18 13:37:00 -04:00
Matthew Brown
9b41bc9b37
Add slower (but more accurate) loop checks
2017-03-14 20:14:25 -04:00
Matt Brown
3d2be3410e
Infer loop types without @var comments
2017-03-13 18:06:56 -04:00
Matt Brown
ae0ca9553f
Remove training wheels
2017-03-13 12:02:28 -04:00
Matthew Brown
5cd1b6735f
Add even more references in docblocks
2017-03-01 22:27:52 -05:00
Matthew Brown
cd5f727d2e
Collect explicit references to classes/methods
2017-02-26 23:09:18 -05:00
Matthew Brown
8db6921f1c
More graceful early exit if not checking variables
2017-02-24 21:27:52 -05:00
Matthew Brown
fa3b292fd4
Fix #101 - restrict the values of pass-by-ref variables
2017-02-23 00:25:28 -05:00
Matthew Brown
9137727993
Fix #99 - treat null coalesce more respectfully
2017-02-17 20:50:47 -05:00
Matthew Brown
7cd1b27ff1
Add more support for logical and/or
2017-02-16 21:00:45 -05:00
Matthew Brown
2d58531631
Fix #98 - add support for logical and/or
2017-02-16 20:43:23 -05:00
Matthew Brown
500044dac1
Make sure $argv and $argc are not globally available
2017-02-12 22:12:31 -05:00
Matthew Brown
a87ea78efc
Fix variable-scoped byref issue
2017-02-12 19:07:25 -05:00
Matthew Brown
a4323359d3
Fix ternary/which/for conditionals
2017-02-12 18:47:02 -05:00
Matthew Brown
81e24de76f
Fix invalid NullPropertyFetch warning
2017-02-12 18:06:18 -05:00
Matthew Brown
2635744f4e
Simplify array inferred type
2017-02-12 16:58:04 -05:00
Matthew Brown
8e7ab59e2b
Add return types for core vars
2017-02-12 12:22:39 -05:00
Matthew Brown
7876c7ffb9
Allow mixed to override null in byref assignment
2017-02-12 11:34:07 -05:00
Matthew Brown
bb9221ba01
Analyze die/exit expressions
2017-02-11 19:42:12 -05:00
Matthew Brown
f32fabd798
Remove dead code
2017-02-11 19:30:06 -05:00
Matthew Brown
35e4b380cc
Add collection of PossiblyNull* issues
2017-02-11 17:55:08 -05:00
Matthew Brown
dbddedb20b
Don’t create objectlike if we some properties are untyped
2017-02-10 23:35:34 -05:00
Matt Brown
32d85e20da
Remove unused vars
2017-02-10 19:10:13 -05:00
Matt Brown
6b2bb7d917
Store first code location for all variables in a statement list
2017-02-07 18:09:12 -05:00
Matthew Brown
01beb97413
Fix #87 - array types from docblocks can be reasoned about safely
2017-02-03 22:07:14 -05:00
Matthew Brown
0fbf8b5619
Remove more dead code
2017-02-02 00:45:23 -05:00
Matthew Brown
d3abc0011d
Fix #80 - add dead code checks via command line
2017-01-31 23:24:33 -05:00
Matthew Brown
ff46487353
Be more discerning about unaryminus/plus inferred type
2017-01-25 21:50:34 -07:00
Matthew Brown
c14a19370f
Improve UnaryPlus/Minus still more
2017-01-25 20:23:06 -07:00
Matthew Brown
f03807e7b7
Fix unaryplus/minus type inference
2017-01-25 20:02:19 -07:00
Matthew Brown
0da9c10d36
Don’t complain when adding array and object-like array
2017-01-23 15:40:55 -07:00
Matt Brown
a67800cac7
Ignore cloning of mixed variables
2017-01-19 15:00:05 -05:00
Matthew Brown
9220b958eb
Fix phpcs errors
2017-01-16 19:06:39 -05:00
Matthew Brown
b3726c9de5
Use getcwd() for the project’s base, not the config file parent directory
2017-01-16 18:33:04 -05:00
Matthew Brown
e3a9cb98c3
Add extra issue for invalid clone and fix issue reporting;
2017-01-16 12:59:09 -05:00
Matthew Brown
5315fd15ad
Fix namespaced functions in regular use statements
2017-01-16 00:49:12 -05:00
Matthew Brown
ce89ac4986
Fix #50 - asserting about docblock types no longer causes error
2017-01-15 17:52:01 -05:00
Matthew Brown
faccc73dc1
Fix #52 by analysing non-main parts of issets
2017-01-15 13:58:20 -05:00
Matthew Brown
03141e41c2
Move string-stored types into named classes
2017-01-15 10:22:05 -05:00
Matt Brown
35c06261b9
Fix #38 - emit issue for non-array on right too
2017-01-13 13:09:52 -05:00
Matthew Brown
5f54a9571c
Fix deep project checks
2017-01-12 01:03:48 -05:00
Matthew Brown
17329015dc
Discriminate between checking, visiting and analyzing in method names
2017-01-07 15:09:47 -05:00
Matthew Brown
694da2cabd
Simplify a lot of APIs
2017-01-07 14:35:07 -05:00
Matthew Brown
7609ca02c0
Fix #32 by evaluating all class references in files lazily
2017-01-04 23:42:58 -05:00
Matthew Brown
0b3b3f01f3
Fix support for traits returning self
2016-12-31 11:49:04 -05:00
Matthew Brown
b068bd7858
Fix many bugs
2016-12-30 20:05:32 -05:00
Matthew Brown
21816723c7
Make config schema more relaxed about ordering and fix trait bugs
2016-12-30 01:51:29 -05:00
Matthew Brown
641ffc09c9
Add NullOperand issue for easy ignoring
2016-12-29 00:32:12 -05:00
Matthew Brown
18e7c65430
Emit more InvalidOperand issues
2016-12-29 00:14:06 -05:00
Matthew Brown
992e7ae256
Fix #1 - add in support for !==false-negating assertions in ifs
2016-12-28 16:39:05 -05:00
Matthew Brown
797875ba9a
Fix #10 - allow negated assignments
2016-12-28 16:29:50 -05:00
Matthew Brown
6972c45c14
Remove vars from parent clauses when they are reconciled with vars
2016-12-28 14:20:16 -05:00
Matthew Brown
05834a0db3
Fix #13 by revamping how we treat type assertions in if statements and ternary expressions
2016-12-28 13:12:06 -05:00
Matthew Brown
513fcea101
Only assign type when not null
2016-12-25 01:12:26 +00:00
Matthew Brown
c51d8f5220
Implement MixedOperand and InvalidOperand issues
2016-12-24 18:29:11 +00:00
Matthew Brown
c55870e26c
Allow generic TypeChecker::isContainedBy checks
2016-12-24 18:28:43 +00:00