Brown
3f226e2e86
Fix #2867 - treat echo as impure
2020-02-24 14:38:05 -05:00
Brown
ae08552f40
Add null check
2020-02-21 16:04:18 -05:00
Brown
443558ca49
Fix #2844 - resolve constant offset references
2020-02-21 15:56:30 -05:00
Matthew Brown
653353709a
Use MethodIdentifier object instead of string
2020-02-14 20:54:26 -05:00
Matthew Brown
5eb2ebc508
Add more type-system protections for bad array args
2020-01-29 23:41:17 -05:00
Brown
15808458cc
Better understand nesting loops and switches
...
Fixes #2700
2020-01-27 12:17:12 -05:00
Matthew Brown
8c89760ff3
Use more accurate type for large arraya
...
Fixes #2690
2020-01-25 10:38:23 -05:00
Brown
c07fd13f2b
Fix #2623 - prevent crash when combining class strings in constants
2020-01-15 11:26:58 -05:00
Matthew Brown
c3edbdbc19
Allow checking $_SESSION for null without altering type
2020-01-14 21:51:04 -05:00
Brown
1ccababcb7
Track list-ness of constant arrays
...
Fixes #2621
2020-01-14 12:13:41 -05:00
Matthew Brown
e1daf26202
Improve support for null coalesce checks
2020-01-14 00:53:38 -05:00
Тальгат Хайруллов
39a822759d
#2579 TooManyArguments was triggered if the variadic function declared at the autoloader file. Fixed. ( #2580 )
2020-01-12 11:33:38 -05:00
Matthew Brown
9fa2db1b6c
Move Union::getTypes to Union::getAtomicTypes
2020-01-04 12:20:26 -05:00
Brown
0e39759ed6
Improve solution to #2546 slightly
2020-01-03 10:56:47 -05:00
Brown
4263417ac3
Fix #2546 - ignore vars set inside loop
2020-01-03 10:33:32 -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
Brown
b3cf9d3958
Catch circular references in constants
...
Fixes #2453
2019-12-10 16:16:44 -05:00
Brown
821f3528d2
Fix #701 - indicate issues fixable with Psalter
2019-12-02 15:24:01 -05:00
Matthew Brown
d1fbd1fa26
Add working arrow-functions implementation
2019-11-26 23:52:26 -05:00
Brown
0bcb7863f3
Use better system for storing inferred types and assertions
2019-11-25 11:44:54 -05:00
Matthew Brown
e76beffa78
Fix #2355 - don’t remove used variables
2019-11-17 14:53:08 -05:00
Brown
a5c3304853
Add support for if replacement
2019-11-14 11:03:16 -05:00
Brown
fe5e675881
Improve unvariable removal
2019-11-13 15:05:21 -05:00
Brown
25b60eb944
Fix #2325 - ignore unused vars with $_ prefix
2019-11-12 10:20:34 -05:00
Brown
e822ec7541
Unsetting list elements should turn to an array
2019-10-09 12:49:31 -04:00
Brown
d225374d6d
Fix #2156 - do better inference after isset
2019-10-01 19:31:08 -04:00
Brown
a81c3067ad
Store the whole type
2019-10-01 17:09:32 -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
Matthew Brown
0b4981f01b
Fix #1551 - do better at inferring class constant types
2019-09-14 14:26:31 -04:00
Brown
944531b73b
fix #2125 - Don’t assume function args are necessarily authoratative
2019-09-11 13:52:58 -04:00
Matthew Brown
dee2cf3281
Detect use of static inside pure function
2019-08-31 21:31:53 -04:00
Matthew Brown
d09a427214
Don’t make test reliant on knowing about Exception
2019-08-26 00:24:56 -04:00
Brown
9835943294
Fix #2041 - make sure property is always set
2019-08-21 11:25:08 -04:00
Matthew Brown
c5f62d261d
Remove redundant @psalm-suppress in Psalm’s codebsae
2019-08-18 16:10:12 -04:00
Matthew Brown
5d94e340ee
Remove unused suppressions in tests
2019-08-18 15:34:32 -04:00
Matthew Brown
b6d0aeaa9c
Avoid erroneous issue suppression complaints
2019-08-18 14:56:47 -04:00
Matthew Brown
eb50aad3a1
Fix offsets when checking function suppressions
2019-08-18 14:44:45 -04:00
Matthew Brown
2a5e0d8f39
Fix #1444 - track unused suppressions
2019-08-18 14:27:50 -04:00
Matthew Brown
1e400c5e1d
Add slash
2019-08-18 11:24:14 -04:00
Matthew Brown
b098b4e3b2
Fix implicit cast
2019-08-18 11:21:26 -04:00
Matthew Brown
f5b9dfe543
Add support for @psalm-scope-this
...
Ref #2032
2019-08-18 11:18:10 -04:00
Brown
b5614d03f8
Add detection for unused function calls
2019-08-13 13:15:23 -04:00
Matthew Brown
d5b026839c
Add support for different taint types ref #1990
2019-08-12 23:16:05 -04:00
Brown
6eb62591ab
Specialise calls when functions are pure
2019-08-05 18:33:33 -04:00
Brown
87bf907c1e
Fix echo checks
2019-08-05 10:21:23 -04:00
Matthew Brown
b2c0993cdc
Add framework for taint analysis to Psalm
...
Ref #611
2019-08-04 10:37:36 -04:00
Brown
3a1a3ebc47
Fix #1980 - don’t complain about UnusedVariable after continue
2019-07-31 17:35:56 -04:00
Matthew Brown
f718c2fca1
Fix #1974 - prevent bad property defaults on static properties
2019-07-29 22:18:46 -04:00
Brown
ea2074b19b
Allow suppression of unused variable issues
2019-07-24 17:01:41 -04:00
Jeffrey Yoo
ed61bcafda
Issue 1926 unused variable ( #1967 )
...
* add support for Psalter to remove UnusedVariable
* fix issues found by Psalm
* fix stylistic issues found by phpcs
* added more stylistic changes and suppressed UndefinedClass error for Psalm
* suppress TypeDoesNotContainType error for CheckTrivialExprVisitor
* fix whitespace issue raised by phpcs
* fix bug where partial removal of assignment by ref does not process '&' symbol
* Remove workspace files
* remove 'Array_' and 'ArrayItem' classes from blacklist and add 'New_' class to the blacklist
2019-07-24 16:48:54 -04:00
Brown
5943f6036e
Fix #1859 - allow function_exists introspection when function exists
2019-06-28 10:48:30 -04:00
LeSuisse
f29826b958
Fully qualify constants and function calls ( #1849 )
...
This should give a small performance boost.
Part of #1837 .
The change is enforced via phpcs and can be autofixed
with phpcbf.
2019-06-26 16:52:29 -04:00
Brown
1864d9a2be
Allow templated @var on return docblocks
2019-06-26 16:26:14 -04:00
Brown
b1d1ab974c
Preserve formatting of callable type
2019-06-06 14:27:49 -04:00
Brown
f309c755f8
Add ability to move classes
2019-06-05 08:50:24 -04:00
Brown
523ad144a2
Fix @psalm-suppress with newline
2019-06-03 15:02:28 -04:00
Matthew Brown
2439a9f6a0
Allow instance method renaming, too
2019-06-02 12:02:39 -04:00
Matthew Brown
c569f3932c
Use separate method for parsing docblocks
2019-06-01 18:44:59 -04:00
Matthew Brown
736f01c29e
Store more accurate return type location
2019-06-01 13:02:20 -04:00
Matthew Brown
e438387149
Shorten too-long line
2019-06-01 12:26:48 -04:00
Matthew Brown
909e02d441
Move var docblocks within function
2019-06-01 12:25:57 -04:00
Matthew Brown
dc5a5bcd9d
Simplify var docblock parsing signature
2019-06-01 11:53:32 -04:00
Matthew Brown
cd969c51e5
Generate missing param types from callers
...
Fixes #1707
2019-05-31 01:47:35 -04:00
Ilija Tovilo
5a14e4b1cf
Progress bar ( #1709 )
...
* Revert "Revert "Implement better progress""
This reverts commit 4302596654
.
* Revert "Revert "Implement dots progress bar""
This reverts commit e41733d789
.
* Revert "Revert "Switch to VoidProgress by default""
This reverts commit 304ffeb0a3
.
* Revert "Revert "Pass success flag to progress""
This reverts commit 62a690ee4e
.
* Improve socket communication
* Use an underscore
* Add means to disable progress
* Add extra newline before progress bar
2019-05-30 10:30:41 -04:00
Matthew Brown
4302596654
Revert "Implement better progress"
...
This reverts commit 042070d0fd
.
2019-05-27 13:07:02 -04:00
Ilija Tovilo
042070d0fd
Implement better progress
2019-05-26 23:18:48 -04:00
Matthew Brown
790bc53bfd
Fix #1681 - interpret parent annotation properly
2019-05-25 11:51:09 -04:00
Brown
4ecf370900
Coerce mixed values when passed as arguments
2019-05-21 11:51:41 -04:00
Matthew Brown
c6e29322c0
Fix unset bug
2019-05-13 01:35:29 -04:00
Matthew Brown
a3a208a7c9
Remove unused variables
2019-05-12 23:13:27 -04:00
Matthew Brown
9be8013633
Add a way to ignore variable method & property calls
2019-04-20 17:49:49 -04:00
bugreportuser
2e147585a1
Allow ignoring exceptions only in global scope
2019-04-16 22:42:45 -04:00
bugreportuser
f5e03715f3
Fix memory leak
2019-04-02 23:36:55 -04:00
bugreportuser
4fc7e4affc
Give errors for all uncaught exceptions
2019-03-31 14:22:19 -04:00
Matthew Brown
5e287fa83e
Fix #678 - allow docblock types to set constraints
2019-03-28 00:16:35 -04:00
Matthew Brown
cf21c3e366
Fix #678 - allow docblock to override mixed assignment of static vars
2019-03-28 00:10:08 -04:00
Matthew Brown
496a175a9f
Fix #1497 - respect constants stubbed in define() calls
2019-03-25 00:07:32 -04:00
bugreportuser
976c2c5ef3
Add an error for throws in global scope
2019-03-24 23:03:37 -04:00
Tyson Andre
fc83f1c3ea
Fix typo: "Arithmentic" -> "Arithmetic"
2019-03-24 23:00:51 -04:00
Matthew Brown
6bcc3d0261
Don’t stop analysing on var_dump
2019-03-23 10:58:26 -04:00
bugreportuser
42137f6054
Ignore unused superglobals
2019-03-22 10:19:39 -04:00
bugreportuser
aafb3ee6d6
Ignore unused static vars
2019-03-22 09:50:47 -04:00
bugreportuser
e31cfa503d
Allow reconciling superglobal types
2019-03-16 12:49:38 -04:00
Matthew Brown
17235cedf9
Allow sequential unsets with missing keys
2019-03-11 01:54:32 -04:00
Matthew Brown
848b070946
Fix #1413 - don’t complain about byref use param
2019-03-10 16:36:35 -04:00
bugreportuser
d120e582ac
Use config globals for invalid global scope
2019-03-07 23:21:56 -05:00
bugreportuser
056e5a5b1e
Allow setting globals in config
2019-03-06 15:59:41 -05:00
Brown
bd372e93af
Add config flags for findUnusedVariables and findUnusedCode
2019-03-05 15:45:09 -05:00
Matthew Brown
b7320e2778
Remove unnnecessary param
2019-03-03 16:45:35 -05:00
Matthew Brown
fb9e9bea32
Fix const reference in current context
2019-03-03 16:43:24 -05:00
Brown
154e1fa38b
Fix #1375 - improve treatment of dynamically-declared namespaces
2019-02-21 18:19:12 -05:00
bugreportuser
024488c1d6
Use helper methods
2019-02-20 10:55:36 -05:00
bugreportuser
c097c59f33
Remove wrong condition
2019-02-20 10:55:36 -05:00
bugreportuser
14ee221075
Fix errors
2019-02-20 10:55:36 -05:00
bugreportuser
cd23a19931
Allow concat for define first arg
2019-02-20 10:55:36 -05:00
Matthew Brown
12f1ffca11
Fix issue reconciling mixed vars inside loop
2019-02-18 11:39:05 -05:00
Bruce Weirdan
8408effe57
Dropped unused uses
2019-02-17 13:17:45 -05:00
Matthew Brown
db89b3cc3f
Add initial support for fixing MissingParamType
2019-02-02 11:28:48 -05:00
Matthew Brown
99569e8ee3
Fix #1173 - transform const X = true to a true type
2019-01-21 16:55:50 -05:00
Matthew Brown
681391f970
Fix #1220 - improve constant resolution
2019-01-20 09:52:26 -05:00