Matt Brown
|
3046468d1e
|
Add hints for MixedAssignment issues
|
2021-03-17 01:10:42 -04:00 |
|
orklah
|
5191dac3fa
|
Introduce Virtual Nodes in order to differentiate real nodes in plugins (#5222)
|
2021-02-15 16:18:41 -05:00 |
|
Matt Brown
|
e43f2259ea
|
Fix #4839 - undefined possibly set in by-reference should be treated as such
|
2020-12-14 16:57:48 -05:00 |
|
Matt Brown
|
bef9ab37e6
|
Fix #4759 – don’t generate assertion when assigning to same-named variable
|
2020-12-03 09:42:26 -05:00 |
|
Matt Brown
|
1a629ccc82
|
Fix a few issues
|
2020-12-01 18:26:15 -05:00 |
|
Matt Brown
|
6f86201f34
|
Break up AssignmentAnalyzer::analyze
|
2020-11-30 14:57:35 -05:00 |
|
Matthew Brown
|
60ac109c01
|
Add RedundantPropertyInitializationCheck (#4732)
* Add RedundantPropertyInitializationCheck
* add documentation for RedundantPropertyInitializationCheck (#4734)
Co-authored-by: orklah <orklah@users.noreply.github.com>
|
2020-11-29 11:57:20 -05:00 |
|
Matt Brown
|
0efd4ebd7d
|
Detect some erroneous issets
|
2020-11-29 09:26:39 -05:00 |
|
Matt Brown
|
f8ddc7e58a
|
Add slash
|
2020-11-24 15:07:15 -05:00 |
|
Matt Brown
|
41af653bd4
|
Add support for some dependent types
|
2020-11-24 14:50:35 -05:00 |
|
Matt Brown
|
95de6cf177
|
Allow immutable classes to be specialised through calls
|
2020-11-19 01:38:20 -05:00 |
|
Matt Brown
|
4e5111f1a8
|
Fix #4472 - if something flows into a byref var it’s used
|
2020-11-17 15:30:53 -05:00 |
|
Matt Brown
|
46ebca4497
|
Fix coalesce operation tainting
|
2020-11-10 14:36:36 -05:00 |
|
Matt Brown
|
81babf2430
|
Clone to prevent incorrect references
|
2020-11-10 09:01:46 -05:00 |
|
Matt Brown
|
966b139504
|
Fix dupe semicolons
|
2020-11-01 11:42:09 -05:00 |
|
Matt Brown
|
024d93b7fd
|
Fix #4467 - variables are only the same if they were set in the same location
|
2020-11-01 11:26:42 -05:00 |
|
Matt Brown
|
8a2983e5e9
|
Fix #4336 - don’t merge sources twice for null coalesce
|
2020-10-15 09:57:37 -04:00 |
|
Matt Brown
|
724b25b918
|
Change control_flow_graph to data_flow_graph
|
2020-10-13 17:28:12 -04:00 |
|
Matt Brown
|
516141a380
|
Rename ControlFlowGraph to more appropriate DataFlowGraph
|
2020-10-13 16:49:03 -04:00 |
|
orklah
|
10f2966dcb
|
return types (#4311)
* return types
* remove willReturn for void methods
|
2020-10-12 15:02:52 -04:00 |
|
Matt Brown
|
14efde286f
|
4.x - refactor unused variable detection
This turns unused variable detection into an explicit control-flow problem, where before we had a more simplistic mark-and-sweep algorithm
|
2020-09-30 12:28:13 -04:00 |
|
Brown
|
19f88a2e31
|
Add improvements from unused variable checks
|
2020-09-28 00:45:02 -04:00 |
|
Brown
|
56cddd16bf
|
Rename TaintGraph to ControlFlowGraph because it’s about to do more
|
2020-09-20 23:59:52 -04:00 |
|
Brown
|
0f6a271858
|
Improve file-based suppression of taints
|
2020-09-20 19:37:25 -04:00 |
|
Brown
|
2968b3b065
|
Add to StatementsAnalyzer taint object instead of Context
|
2020-09-20 18:42:21 -04:00 |
|
Brown
|
abb9502921
|
Rename Taint object to TaintGraph
|
2020-09-20 18:27:02 -04:00 |
|
orklah
|
ead107fa9e
|
More return types (#4173)
* add native return types
* redundant phpdoc
|
2020-09-12 11:24:05 -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
|
92239add4d
|
Add some backwards-incompatible changes for 4.x
|
2020-08-30 11:44:14 -04:00 |
|
Brown
|
efe143a396
|
Fix #4077 - always track closure purity
|
2020-08-28 12:42:55 -04:00 |
|
Brown
|
4e10a0ed6f
|
Fix #4036 - add immutable annotations automatically too
|
2020-08-24 19:29:00 -04:00 |
|
Brown
|
67f9adb33c
|
Allow adding pure annotations to functions
Ref #4036
|
2020-08-23 10:28:26 -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 |
|
Brown
|
eddd7b8c11
|
Fix #1916 - support @var docblock annotations in more places
|
2020-07-26 13:23:21 -04:00 |
|
Brown
|
b1e583ebed
|
Detect concat operation on property
Ref #3870
|
2020-07-24 16:01:45 -04:00 |
|
Brown
|
76bd5b6278
|
Refactor type comparison
|
2020-07-21 19:40:35 -04:00 |
|
Brown
|
9ca8fb80b7
|
Carry over taints after @var docblock type hints
|
2020-07-17 11:30:44 -04:00 |
|
Brown
|
42a3cedd31
|
Fix #3742 - add null to type after possibly null array access
|
2020-07-05 09:12:07 -04:00 |
|
Brown
|
67b2edc328
|
Allow more things to be suppressed with @psalm-suppress TaintedInput
|
2020-07-02 11:53:51 -04:00 |
|
Brown
|
ae7c5b095b
|
Fix #3712 - allow taints to be suppressed with @psalm-suppress
|
2020-07-01 23:23:45 -04:00 |
|
Brown
|
8f2e28c36b
|
Improve tainting of specializable classes
|
2020-06-19 01:22:51 -04:00 |
|
Brown
|
49f0592794
|
Improve tracking of array taints
|
2020-06-18 18:48:19 -04:00 |
|
Brown
|
f609a01497
|
Move static property fetch analyzer to own class
|
2020-06-18 11:53:24 -04:00 |
|
Matthew Brown
|
683bde9540
|
Fix #3573 - allow UnnecessaryVarAnnotation to be suppressed
|
2020-06-13 16:48:10 -04:00 |
|
Brown
|
a266d4748b
|
Fix build
|
2020-05-26 07:50:11 -04:00 |
|
Brown
|
953be61cf2
|
Allow limiting connected taint paths
|
2020-05-25 23:28:11 -04:00 |
|
Brown
|
a198b09eb7
|
Add intermediary concat op node
|
2020-05-23 21:38:09 -04:00 |
|
Brown
|
f5a0622ad2
|
Fix style
|
2020-05-23 08:06:31 -04:00 |
|
Brown
|
16af6a5773
|
Improve concat taint propagation
|
2020-05-23 01:11:16 -04:00 |
|
Matthew Brown
|
187b944680
|
Add faster taint analysis
|
2020-05-22 12:33:29 -04:00 |
|
Joe Hoyle
|
6f28d741bc
|
Display variable assignment type in LSP hovers (#3401)
* Add node references for variable assignments
* Break up line
Co-authored-by: Matthew Brown <github@muglug.com>
|
2020-05-20 17:40:22 -04:00 |
|
Brown
|
ace049a068
|
Beautify BinaryOpAnalyzer
|
2020-05-18 18:57:09 -04:00 |
|
Brown
|
5ee1487a01
|
Make ExpressionAnalyzer more beautiful
|
2020-05-18 15:13:27 -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
|
48da7a4be8
|
Fix issues found with Vimeo’s code
|
2020-05-10 21:09:48 -04:00 |
|
Brown
|
640ffdb324
|
Fix #3323 - make short object-like arrays sealed tuples
|
2020-05-08 14:36:06 -04:00 |
|
Brown
|
d99fbc0d4d
|
Remove blank line
|
2020-05-03 00:26:50 -04:00 |
|
Brown
|
b8a1f5d5c9
|
Allow destructuring on arrayaccess implementers
|
2020-05-03 00:08:03 -04:00 |
|
Brown
|
d3fba74f75
|
Fix false-positive
|
2020-05-02 21:56:28 -04:00 |
|
Brown
|
3e0c4cfb75
|
Fix #3210 - prevent possibly-null array access from destructure
|
2020-05-02 20:36:41 -04:00 |
|
Brown
|
f91e94b64e
|
Make sure to remember correct positions of @var references
|
2020-04-27 00:05:20 -04:00 |
|
Fabien Villepinte
|
a93bf28532
|
Fix #3045 - ignore mixed assignments to variables named $_ (#3211)
|
2020-04-21 20:18:38 -04:00 |
|
Matthew Brown
|
47c1470e3b
|
Refactor reference checks to use more appropriate properties
|
2020-03-28 16:30:56 -04:00 |
|
Brown
|
971ae50bea
|
Do prep work for #3024 - improve handling of absent class references
|
2020-03-26 12:35:27 -04:00 |
|
Matthew Brown
|
4232bfb6e6
|
Fix location
|
2020-03-15 23:29:52 -04:00 |
|
Matthew Brown
|
6c3ff8f245
|
Remove unused variable
|
2020-03-15 23:21:48 -04:00 |
|
Matthew Brown
|
a8a1142889
|
Fix #2977 - make MixedAssignment message a bit more clear, hopefully
|
2020-03-15 23:20:12 -04:00 |
|
Matthew Brown
|
0aca01faea
|
Improve fix to #2805
|
2020-03-14 01:09:12 -04:00 |
|
Brown
|
04bcc32efb
|
Fix #2940 - fix array offset assignment under ??=
|
2020-03-09 14:09:41 -04:00 |
|
Matthew Brown
|
7d88100ad3
|
Docblock-provided type is not inferred
|
2020-02-12 11:34:54 -05:00 |
|
Brown
|
da43b8188f
|
Fix #2632 - detect invalid by-ref assignments in pure functions
|
2020-01-23 14:21:34 -05:00 |
|
Brown
|
bd9142f131
|
Fix #2574 - remove assertions after increment
|
2020-01-09 11:51:56 -05:00 |
|
Matthew Brown
|
9fa2db1b6c
|
Move Union::getTypes to Union::getAtomicTypes
|
2020-01-04 12:20:26 -05:00 |
|
Brown
|
de0fad2197
|
Fix #2541 - check variable var assignment
|
2020-01-02 14:07:02 -05:00 |
|
Matthew Brown
|
0c7851ae21
|
Fix #2526 - always check for array assignment in assignop
|
2019-12-29 08:36:46 -05:00 |
|
Matthew Brown
|
55c2f7faa2
|
Fix #2508 - don’t replace templated types with generic ones inside own function
|
2019-12-28 18:38:02 -05:00 |
|
Matthew Brown
|
141bfd313f
|
Improve handling of assignments in arrays
|
2019-12-22 12:36:16 +00:00 |
|
Brown
|
ef44bd104e
|
Consolidate some fixes from the binaryop branch
|
2019-12-06 12:47:27 -05:00 |
|
Brown
|
19838fc7f5
|
Fix #2423 - pass by ref variable status after byref assignment
|
2019-12-05 13:37:03 -05:00 |
|
Brown
|
821f3528d2
|
Fix #701 - indicate issues fixable with Psalter
|
2019-12-02 15:24:01 -05:00 |
|
Matthew Brown
|
ef829002bf
|
Fix ref
|
2019-12-01 10:33:27 -05:00 |
|
Matthew Brown
|
e40aaafe61
|
Allow explicit @var mixed docblocks
Fixes #2397
|
2019-12-01 10:19:42 -05:00 |
|
Matthew Brown
|
c75f7dc4d5
|
Fix #2339 - add support for null coalescing operator
|
2019-11-27 00:34:23 -05:00 |
|
Brown
|
5626058eff
|
Fix #2374 - refine error-suppressed output a little better
|
2019-11-25 15:38:54 -05:00 |
|
Brown
|
0bcb7863f3
|
Use better system for storing inferred types and assertions
|
2019-11-25 11:44:54 -05:00 |
|
Brown
|
8876499ddd
|
Fix #2252 - allow destructuring of ArrayAccess objects
|
2019-10-22 11:17:42 -04:00 |
|
Brown
|
353cf2351e
|
Fix #2259 - if error suppression is use, list destructuring values will be nullable
|
2019-10-22 10:40:37 -04:00 |
|
Brown
|
b29227aaf6
|
Allow taints to be removed via annotation
|
2019-10-15 16:25:27 -04:00 |
|
Brown
|
22a12444df
|
Fix #2220 - detect destructuring of non-array
|
2019-10-15 13:55:30 -04:00 |
|
Brown
|
16c33d1565
|
Add support for list type
Fixes #2209
|
2019-10-08 18:44:46 -04:00 |
|
Brown
|
f8f8b633b1
|
Suppress a bunch of PossiblyUndefinedArrayOffset issues
|
2019-10-01 15:44:43 -04:00 |
|
Matthew Brown
|
a9d0296252
|
Fix #2182 - allow modification to cloned objects inside
|
2019-09-30 22:07:20 -04:00 |
|
Brown
|
cf799d0926
|
Fix #2173 - remove @var annotations automatically
|
2019-09-26 15:08:05 -04:00 |
|
Brown
|
c5ef2516b5
|
Fix #2150 - add detection for unnecessary @var annotations
And also remove them from codebase
|
2019-09-19 11:59:43 -04:00 |
|
Brown
|
a1ea5c38c2
|
Clean up unnecessary annotation
Ref #2111
|
2019-09-09 11:20:47 -04:00 |
|
Brown
|
b49444b8ad
|
Allow immutable objects to be cloned
Fixes #2111
|
2019-09-09 11:14:40 -04:00 |
|
Brown
|
8601731fa2
|
Prohibit mutation-free assignment ops
|
2019-09-03 12:16:31 -04:00 |
|