Matt Brown
6e67030925
Fix #702 - prevent bad array to iterable cast
2018-04-30 13:17:09 -04:00
Matthew Brown
acacde173e
Fix highlight_string return type default
2018-04-30 01:49:55 -04:00
Matthew Brown
59bbf6f896
Allow Exception::getPrevious to return null
2018-04-30 00:44:43 -04:00
Matthew Brown
6ad2184b7e
Improve highlight_string/highlight_file signatures
2018-04-30 00:31:27 -04:00
Matthew Brown
1946bc0085
Allow resource to be cast to string
2018-04-30 00:19:35 -04:00
Matthew Brown
99da371ac4
Move memoisation after callmap branch
2018-04-28 13:49:27 -04:00
Matthew Brown
496256c2a5
Make memoisation more universal
2018-04-28 13:49:21 -04:00
Matthew Brown
da6209276f
Allow ability to memoize empty method calls based on config
2018-04-28 13:05:43 -04:00
Matt Brown
a0984cdaf1
Fix #697 - make missing objectlike fields an InvalidArgument
2018-04-27 17:10:57 -04:00
Matt Brown
6b3759a266
Fix #699 - prevent stubs from overriding known functions
2018-04-27 15:00:22 -04:00
Matt Brown
4507962883
Fix possibly undefined issue
2018-04-25 14:45:51 -04:00
Matt Brown
8ec34ed4ed
Only cache effects hashes when there’s no change
2018-04-25 14:33:39 -04:00
Matt Brown
0c24c0cb20
Remove unused code
2018-04-25 13:12:42 -04:00
Matt Brown
a409b3c32a
Remove unnecessary echo
2018-04-25 11:53:10 -04:00
Matt Brown
9a1674bd0e
Remove checker cache optimisation (v2 only)
2018-04-25 11:52:24 -04:00
Matt Brown
d09d547718
Trigger InvalidDocblock when @return missing type
2018-04-25 11:18:05 -04:00
Matt Brown
37620ce2e5
Bump memory limit
2018-04-25 10:33:15 -04:00
Matthew Brown
048a32e7b6
Also check incremental overflows ref #691
2018-04-24 23:12:01 -04:00
Matthew Brown
35725267f9
Fix #691 - Allow comparisons to float for integer results
2018-04-24 23:02:20 -04:00
Matthew Brown
e2400920b9
Fix #693 - add @TysonAndre’s fix for atomic type checks
2018-04-24 21:27:31 -04:00
Matthew Brown
19ccdbc08b
Remove unnecessary foreach
2018-04-24 21:15:33 -04:00
Matthew Brown
3e7e1b3020
Fix #694 - remove descendent vars when possibly reassigning
2018-04-24 21:02:07 -04:00
Matthew Brown
21871bd8d4
Remove PHP 5 dead code cc @TysonAndre
2018-04-24 07:08:14 -04:00
Matthew Brown
09082ddf52
Fix #695 - fix PHP parser cache version
2018-04-24 07:07:04 -04:00
Matthew Brown
668cf2c0be
Fix #692 - remove text after the end of a method
2018-04-23 09:52:40 -04:00
Matthew Brown
2fabdf3353
Fix #314 - add a way to indicate @method list is comprehensive
2018-04-22 00:40:30 -04:00
Matthew Brown
1c7568e612
Fix #642 - allow @method to override existing methods
...
behind usePhpDocMethodsWithoutMagicCall="true"
2018-04-21 23:08:08 -04:00
Matthew Brown
8b50cdf315
Fix #632 - add support for @method annotations when method can’t be found
2018-04-21 22:44:54 -04:00
Matthew Brown
d02b148820
Fix #633 - support @method for magic __call methods
2018-04-21 22:13:10 -04:00
Matthew Brown
da69e60cf3
Don’t error on existing Psalm configs cc @ostrolucky
2018-04-21 19:05:26 -04:00
Gabriel Ostrolucký
2295756793
fix xsd path replacement in --init
2018-04-21 18:55:42 -04:00
rightfold
10a90d2270
Use less obscure method for checking a string against many other strings
2018-04-21 16:04:03 -04:00
rightfold
5c908da55a
Check that __clone, __construct, __destruct signatures omit return types
...
PHP complains when you have a return type declared for these three methods.
2018-04-21 16:04:03 -04:00
Matt Brown
0882b9c0f9
Fix #687 - interpret unpacked arguments in array_push and array_unshift
2018-04-20 17:14:38 -04:00
Matt Brown
131cab2528
Remove bad var_dump
2018-04-20 15:53:19 -04:00
Matt Brown
8b9753a235
Fix parsing of nested callable without args
2018-04-20 15:22:48 -04:00
Matt Brown
8d7c365e5f
Fix #679 - improve template param type checks
2018-04-20 10:52:23 -04:00
Matt Brown
a25a989c12
Prepare v2 dev release
2018-04-19 17:29:07 -04:00
Matt Brown
1f3837d972
Fix #686 - allow undefined class inside class_exists call
2018-04-19 12:16:00 -04:00
Matt Brown
f3b579b06a
Fix #685 - ignore assignment in conditional
2018-04-19 11:58:51 -04:00
Matthew Brown
2b34c1d315
Add extra level 8 containing PHP autoload landmines
2018-04-19 01:03:28 -04:00
Matthew Brown
a5f639d879
Fix array type conversion
2018-04-18 23:49:09 -04:00
Matthew Brown
392f3194c0
Fix #684 - use getIterator return type for IteratorAggregate functions
2018-04-18 23:47:21 -04:00
Matt Brown
41e2d9ef58
Bind callable ): stronger than |
2018-04-18 19:00:08 -04:00
Matt Brown
4c84f88668
Bump allowable config
2018-04-18 15:38:24 -04:00
Matt Brown
aa3ea9c14c
Add a 7th level with even more permissive checks
2018-04-18 15:31:00 -04:00
Matt Brown
6a8fcaef56
Break compatibility with EventBuffer <= 1.5 (5+ years old)
2018-04-18 14:56:33 -04:00
Matt Brown
8c34c3d653
Support empty callable returning callable
2018-04-18 13:23:48 -04:00
Matt Brown
9099a0972b
Remove bad variable check
2018-04-18 12:10:49 -04:00
Matt Brown
4ee0298558
Always panic when two types can never be the same
2018-04-18 12:01:13 -04:00
Matt Brown
b9f55b7b8b
Fix #680 - add intersection to cloned type
2018-04-18 10:59:46 -04:00
Matt Brown
5b7d190640
Emit RedundantCondition when asserting two variables can never be equal
2018-04-17 15:39:09 -04:00
Matt Brown
5a2f6ff0e0
Fix #624 - change some innaccurate issue names
2018-04-17 14:07:02 -04:00
Matt Brown
6afaf5aae9
Make Psalm compatible with PHP Parser 4
2018-04-17 13:06:02 -04:00
Matt Brown
87be0b5863
Change die($message) to explicit exit(1)
2018-04-17 11:48:29 -04:00
Matt Brown
df5d369443
Fix #677 - handle get_class checks more accurately
2018-04-17 10:28:49 -04:00
Matt Brown
b28cc19fd2
Fix bitwise operations on strings
2018-04-16 18:19:18 -04:00
Matt Brown
55153f9542
Fix #676 - bitwise operators didn’t have int return type
2018-04-16 16:36:06 -04:00
Matt Brown
3cc549384f
Type explode more accurately
2018-04-16 16:03:04 -04:00
Matt Brown
02a5d22449
Fix #674 - remove summary for full Psalm run if not in console mode
2018-04-16 14:05:46 -04:00
François Kooman
0c815c7bf4
fix return type of Sodium\crypto_sign_open (sync with sodium_crypto_sign_open)
2018-04-16 14:00:43 -04:00
Matthew Brown
7345a44494
Fix callable parse issue
2018-04-15 18:16:31 -04:00
Matthew Brown
50f4ee95e8
Set from docblock before queuing params for scanning
2018-04-14 13:41:25 -04:00
Matthew Brown
8e07119e57
Fix #673 - don’t store hydration failures when exhuming
2018-04-14 13:39:30 -04:00
Radosław Kowalewski
eab7f7b68b
Suppress MixedArgument
2018-04-14 10:45:05 -04:00
Radosław Kowalewski
88bf8e284c
Configuration fallback to psalm.xml.dist file
...
Closes vimeo/psalm#644
2018-04-14 10:45:05 -04:00
Matt Brown
21b74ae725
Turn useAssertForType on by default (was off)
2018-04-13 17:35:56 -04:00
Matt Brown
3cf5345728
Improve codebase mixed coverage calculation by ignoring initial loops
2018-04-13 17:26:07 -04:00
Bruce Weirdan
11f239f6cb
dropped $link params that shouldn't be there for OO interface
2018-04-13 14:55:34 -04:00
Bruce Weirdan
ea748c5e83
dropped mysqli properties (these should not be in the CallMap)
2018-04-13 14:55:34 -04:00
Matt Brown
6ae39c84fc
Use more locals
2018-04-13 11:28:15 -04:00
Matt Brown
6502eba658
Don’t invalidate object vars after callmap functions
2018-04-13 11:24:59 -04:00
Matt Brown
564cebbaad
Fix #669 - improve signatures of mysql
2018-04-13 10:51:18 -04:00
Matt Brown
8fdd827e0d
Fix scope leaking from autoloader
2018-04-13 10:32:08 -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
Radosław Kowalewski
0ea053bda1
Fix detecting relative paths on windows
...
Fixes vimeo/psalm#655
2018-04-12 16:08:50 -04:00
Matthew Brown
f9b6027bbc
Fix relative path includes on windows
2018-04-11 20:56:11 -04:00
Matthew Brown
1d6e75b06e
Fix #662 - allow callable void return types to be widened
2018-04-11 20:29:16 -04:00
Matt Brown
e58274acaa
Fix #665 - callmap for SplFileObject::fgetcsv
2018-04-11 15:11:14 -04:00
Matt Brown
6e6ae7aaa6
Only complain about redundant conditions when check_variables is true
2018-04-11 14:37:01 -04:00
Matt Brown
6426dbbf0e
Propagate array key updates after assertions to base array
2018-04-11 14:19:42 -04:00
Matt Brown
fe46e4e63d
Make tests a bit more specific
2018-04-10 15:47:04 -04:00
Matt Brown
8faa36c1cf
Improve closure type checking
2018-04-10 15:41:57 -04:00
Matt Brown
c721a7085a
Remove blank line
2018-04-10 14:03:36 -04:00
Matt Brown
fe033f1b6c
Fix #663 - infer array return types for closures
2018-04-10 13:05:31 -04:00
Matt Brown
9bdf9eefd3
Revert changes to sorting, force int return types for comparison functions
2018-04-10 12:38:29 -04:00
Matthew Brown
f15c26d7f4
Change how type impossibilities are treated to improve message types
2018-04-10 01:27:26 -04:00
Matthew Brown
5915718013
Fix #660 - always refer closure types
2018-04-09 22:00:36 -04:00
Matthew Brown
5f47374606
Fix indentation
2018-04-09 21:50:38 -04:00
Matt Brown
7640b00635
Only check functionlike arguments match if we know params
2018-04-09 18:49:11 -04:00
Matt Brown
47255fb19b
Fix array key check after direct assignment
2018-04-09 18:02:45 -04:00
Matt Brown
d3fa972fab
Fix uksort signature too
2018-04-09 16:55:29 -04:00
Matt Brown
7a7bc26ccd
Allow custom sorting methods to only return true/false
2018-04-09 16:54:04 -04:00
Matt Brown
6eabdf326d
Fix display of closure objects
2018-04-09 16:45:54 -04:00
Matt Brown
2b9a2d36cf
Don’t allow non-existent vars to be overridden
2018-04-09 14:32:22 -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
Matthew Brown
bf7bf1ab3c
Make pcntl_signal sig clearer
2018-04-08 13:08:28 -04:00
Matthew Brown
0b95f1017e
Fix issues with callmap callable types
2018-04-08 12:57:56 -04:00
Matthew Brown
7e3a1ec9c3
Add support for checking callable/closure param types
...
Fixes #580
2018-04-08 12:03:35 -04:00