orklah
12cd9590c8
allow $var::class on templates ( #5484 )
2021-03-26 21:21:38 -04:00
sji
19554de6f6
Add @ignore-var
and @psalm-ignore-var
( #5488 )
...
* add `@ignore-var` and `@psalm-ignore-var`
* Change two words
Co-authored-by: Matthew Brown <github@muglug.com>
2021-03-26 21:20:23 -04:00
Saif Eddin Gmati
9f74676524
allow dismissing return value of pure functions with by-reference arguments ( #5463 )
2021-03-25 09:05:59 -04:00
Sergei Morozov
b627962e63
Fix oci8 stubs for PHP 8 ( #5478 )
2021-03-25 00:49:53 -04:00
Bruce Weirdan
a025311e39
Restrict errorLevel and type attributes to valid values ( #5476 )
...
This provides better validation and autocompletion for psalm.xml
2021-03-25 00:27:54 -04:00
Matt Brown
929f931c14
Taint mixed keys too
2021-03-24 16:42:30 -04:00
Jean-Nicolas
30f64b79de
Checks the intersection type if the magic method does not exist ( #5473 )
2021-03-24 15:34:05 -04:00
Matt Brown
10ccbdd8be
Add tainting for array keys
...
Fixes #5470
2021-03-24 15:32:56 -04:00
Matt Brown
937e68cc75
Change taint path names to prepare for allowing array key tainting
2021-03-24 15:23:56 -04:00
Matt Brown
9ad88256d1
Fix error message
2021-03-24 14:32:01 -04:00
Matt Brown
5ecab7b9e7
Bump minimum version of composer/semver to allow constraint parsing
2021-03-24 12:30:13 -04:00
2edf61399a
Add detailed POSIX functions type annotations ( #5469 )
2021-03-24 09:52:34 -04:00
b61ff8cffb
Allow string template params in concatenation ( #5468 )
2021-03-24 09:52:10 -04:00
Sergei Morozov
355c4f7f09
Fix mysqli_real_connect() signature ( #5464 )
2021-03-24 09:51:33 -04:00
Matt Brown
efa9b136d3
Fix linting issues
2021-03-23 19:42:56 -04:00
Saif Eddin Gmati
477ae33cd6
allow dismissing return value of no-return pure functions ( #5461 )
2021-03-23 19:34:12 -04:00
Matt Brown
a96645d2e3
Fix many uses of offsets
2021-03-23 01:30:51 -04:00
Matt Brown
15b0542260
Prevent more offset issues
2021-03-22 23:26:03 -04:00
Matt Brown
bf578d1024
Fix potential crash when calling magic setter
2021-03-22 23:08:38 -04:00
AndrolGenhald
de5a031088
Improve @no-named-arguments support and variadics. ( #5455 )
...
* Improve @no-named-arguments support and variadics.
Handling of argument unpacking and variadics still needs a pretty big makeover, but this is a good start.
Fixes #5420
Improves #5453 (iterable works, array still causes issues)
* Remove unneeded imports.
2021-03-22 19:58:22 -04:00
Matt Brown
07897456e3
Back to 7.4
2021-03-22 19:53:42 -04:00
Matt Brown
b02b684a06
Run on real projects on latest PHP
2021-03-22 19:48:31 -04:00
Matt Brown
ae1fd44b13
Resolve build issues
2021-03-22 19:37:49 -04:00
Matt Brown
9f3f420a5b
Turn on unused variable detection by default on level 1
2021-03-22 09:44:40 -04:00
Sergey Yakimov
fb94db9b1f
Add proper handling of unpacked arguments with string keys ( #5446 )
...
* Add proper handling of unpacked arguments with string keys
* Fix undefined array key error
* Fix missed named arguments handling
* Fix false-positive on variadic parameter
* Add tests
2021-03-22 09:08:05 -04:00
Bruce Weirdan
4eca6acebd
Don't crash on index types used in a conditional type ( #5447 )
...
Fixes crash reported in vimeo/psalm#5423
2021-03-22 09:07:14 -04:00
Matt Brown
b73223f9c1
Add use statements
2021-03-20 22:17:22 -04:00
Matt Brown
f69cab8c02
Fix extra issue tests
2021-03-20 21:55:17 -04:00
Matt Brown
44c6d3035b
Add more mixed origin information
2021-03-20 21:45:38 -04:00
Matt Brown
7f8d522912
Make all mixed issues implement MixedIssue
2021-03-20 21:44:04 -04:00
Matt Brown
d1740394aa
Detect mixed echo argument when unused variable detection is turned on
2021-03-20 20:53:51 -04:00
Bruce Weirdan
b4fab67f3b
Fix DateTimeZone::listIdentifiers() and timezone_identifiers_list() signature ( #5443 )
...
Including historic changes, according to php.net docs.
Fixes vimeo/psalm#5442
2021-03-20 15:43:05 -04:00
Samuel Mortenson
e07337650b
Make taint source keys unique to the added taints. ( #5444 )
2021-03-20 15:42:24 -04:00
Bruce Weirdan
8d78372d43
Use appveyor reporter instead of a file upload ( #5438 )
...
* Use appveyor reporter instead of file upload
* Use tagged version of appveyor reporter
2021-03-19 23:25:34 -04:00
AndrolGenhald
0579c1109b
Fix bugs with array spread operator ( fixes #5421 ) ( #5433 )
2021-03-19 22:43:58 -04:00
Samuel Mortenson
4aabb411a8
Added event to prevent tainting. ( #5398 )
...
* Added event to prevent tainting.
* Remove optional codebase parameter.
* Removed falsy check for codebase.
* Use two separate hooks for adding and removing taints
* Add slashes
* Update add/remove taint test name.
* Cleaned up SafeArrayKeyChecker example plugin.
* Added more AddRemoveTaintsEvent calls to codebase.
* Fix type check error with $added_taints param.
* Added AddRemoveTaintsEvent to remaining classes.
* Fix post-merge error.
* Add comma
* Remove $int_offset that never existed
Co-authored-by: Matt Brown <github@muglug.com>
2021-03-19 22:41:41 -04:00
AndrolGenhald
843305c8e0
Support template property invariance ( fixes #5371 ) ( #5414 )
...
* Support property invariance with templates.
* Fix false positive NonInvariantDocblockPropertyType with grandchild.
* Redo templated property invariance check to fix issues.
* Add template covariant test.
* Fix property invariance false positive with template-covariant.
2021-03-19 21:55:50 -04:00
AndrolGenhald
17f23ccb30
Fix false-positive with non-empty object like array ( fixes #5436 ) ( #5437 )
2021-03-19 21:54:01 -04:00
AndrolGenhald
b859fba52d
Fix array spread false negative that crashes ( fixes #5431 , reverts #2852 ) ( #5432 )
2021-03-19 21:51:36 -04:00
AndrolGenhald
d4590711d6
Fix object-like array keys when combining string and automatic keys ( fixes #5427 ). ( #5428 )
...
* Fix object-like array keys (fixes #5427 ).
* Fix incorrect return types for tests.
* Fix false positive list with literal int key.
2021-03-19 21:44:44 -04:00
Matt Brown
42d3bceb4e
Use more accurate return type
2021-03-18 15:19:29 -04:00
Matt Brown
b7a68edd0b
Simplify complex methods
2021-03-18 15:09:03 -04:00
Matt Brown
a871d0dd58
Fix dumb bug
2021-03-18 11:27:32 -04:00
Matt Brown
e919e41114
Improve labelling
2021-03-18 11:18:49 -04:00
Matt Brown
04f3e29f94
Expand documentation method return type to ensure we’re giving a fair shot
2021-03-18 11:07:02 -04:00
AndrolGenhald
45694d37d4
Fix composer major.minor version detection ( fixes #5415 ) ( #5416 )
...
* Fix composer major.minor version detection (fixes #5415 )
* Add PHP 8 polyfill dependency.
* Fix version check.
2021-03-18 09:42:01 -04:00
orklah
09ee4c1d79
json_encode does not return false if JSON_THROW_ON_ERROR is in flags ( #5417 )
2021-03-18 09:41:44 -04:00
Matt Brown
95287d2a41
Fix directory separators
2021-03-18 09:37:31 -04:00
Matt Brown
d19088bb10
Add better origins for calls
2021-03-17 19:37:21 -04:00
Matt Brown
3046468d1e
Add hints for MixedAssignment issues
2021-03-17 01:10:42 -04:00