ee8c5c9c35
Remove some array_values
2021-11-26 21:47:17 +01:00
04bbd2acba
Fix tests
2021-11-26 21:47:17 +01:00
1129ab1475
Raise RedundantCast when using array_values on a list
2021-11-26 21:47:14 +01:00
orklah
a27e729263
Merge pull request #7002 from orklah/listkeyedarray
...
Disable list flag for TKeyedArray after unset
2021-11-26 21:32:55 +01:00
ralila
fdaed941ad
use return type hints instead of php doc "@return void"
2021-11-26 20:59:41 +01:00
orklah
4f223db455
Disable list flag for TKeyedArray after unset
2021-11-26 20:52:34 +01:00
Bruce Weirdan
f215ed28d0
Drop special handling of constant references on enums
...
Internally enum cases are constants, and they should be resolved as
such.
Fixes vimeo/psalm#6994
2021-11-26 06:00:01 +02:00
orklah
2fbad1bbeb
Merge pull request #6993 from orklah/taint-numerics
...
Taint can't be transmitted through numerics nor bool
2021-11-25 23:20:38 +01:00
orklah
ab61eae5c9
Taint can't transmit through numerics nor bool
2021-11-25 22:51:35 +01:00
orklah
3bc06a8eab
Taint can't transmit through numerics nor bool
2021-11-25 22:40:01 +01:00
Bruce Weirdan
55b2b6b838
Merge pull request #6986 from kamil-tekiela/mysqli-stub-fixes
2021-11-25 00:42:49 +02:00
Kamil Tekiela
d922808e8f
Create mysqli.phpstub
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-11-24 22:30:22 +00:00
Kamil Tekiela
c4c97d3018
Stub fixes for mysqli extension
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-11-24 22:21:56 +00:00
orklah
b4d25cbf60
Merge pull request #6984 from orklah/enumcase-in-attribute
...
allow using EnumCase in an Attribute
2021-11-24 19:52:19 +01:00
orklah
049285add2
allow using EnumCase in an Attribute
2021-11-24 19:43:43 +01:00
orklah
fdf3a8dbb8
Merge pull request #6979 from orklah/6975
...
don't accept unresolved literal string as valid callable-strings
2021-11-23 21:41:04 +01:00
orklah
60f0fd13bf
Merge pull request #6981 from AlessandroMinoccheri/fix-count-for-php-7-1
...
using lenght istead of count for php 7.1 compatibility
2021-11-23 21:40:45 +01:00
AlessandroMinoccheri
ddc13a0dba
using lenght istead of count for php 7.1 compatibility
2021-11-23 21:32:55 +01:00
orklah
e87e92adb5
Merge pull request #6974 from ptomulik/issue-6973
...
Attempt fixing issue 6973
2021-11-23 21:32:32 +01:00
Paweł Tomulik
dac8c98613
attempt to fix #6973
2021-11-23 20:26:07 +01:00
orklah
b42c2814a9
Merge pull request #6971 from orklah/empty-keys
...
fix counting array properties when some are Never
2021-11-23 20:11:47 +01:00
orklah
e8a8055cb4
Merge pull request #6963 from ptomulik/issue-6937
...
Attempt to fix #6937
2021-11-23 20:10:56 +01:00
orklah
7c6b86cef3
suppress error and add test
2021-11-23 20:04:52 +01:00
orklah
9db43cdaae
don't accept unresolved literal string as valid callable-strings
2021-11-23 19:54:09 +01:00
Paweł Tomulik
a7b9a241f3
attempt to fix #6937
2021-11-22 23:24:20 +01:00
orklah
eca56c0c1a
Merge pull request #6972 from orklah/unused-throws
...
prevent Psalm from considering throwing methods as unused just because they're immutable
2021-11-22 22:00:55 +01:00
orklah
d8fcd783c8
fix parse
2021-11-22 21:38:25 +01:00
orklah
1c1e352e5f
prevent Psalm from considering throwing methods as unused just because they're immutable
2021-11-22 21:29:57 +01:00
orklah
e13c48a719
Merge pull request #6927 from veewee/soap-stub-response
...
Invalid SoapClient::__doRequest() response type
2021-11-22 21:23:42 +01:00
orklah
5b5156928f
Merge pull request #6964 from ricardoboss/master
...
Make UnitEnum name property non-empty
2021-11-22 21:20:05 +01:00
orklah
0d47722195
fix counting array properties when some are Never
2021-11-22 21:13:25 +01:00
Bruce Weirdan
9943efb6e3
Merge pull request #6961 from LeSuisse/usleep-0
2021-11-22 15:01:44 +02:00
Ricardo Boss
f93c84b918
Made name property of UnitEnum readonly
2021-11-22 13:47:36 +01:00
Ricardo Boss
6d58a708fc
Make UnitEnum name property non-empty
2021-11-22 13:38:08 +01:00
Thomas Gerbet
84d327678b
usleep(0) is valid
...
Similar to ef9858c458
.
usleep() only throws the value is < 0:
```
Uncaught ValueError: usleep(): Argument #1 ($microseconds) must be greater than or equal to 0
```
2021-11-22 11:58:39 +01:00
Bruce Weirdan
cd8ba5cd88
Merge pull request #6955 from BenMorel/sleep
2021-11-22 12:46:18 +02:00
Benjamin Morel
ef9858c458
sleep(0) is valid
2021-11-22 09:47:34 +01:00
orklah
79fa7f5993
Merge pull request #6953 from orklah/callstatic-pure
...
check __callStatic purity instead of the pseudoMethod purity
2021-11-21 23:02:07 +01:00
orklah
912079e49c
Merge pull request #6954 from ciaranmcnulty/file-put-contents-stub
...
Update $data argument types of file_put_contents
2021-11-21 22:13:17 +01:00
Ciaran McNulty
c91e245074
Update data types of file_put_contents
...
The main aim is to exclude boolean false, which could be coerced into '' in the following cases:
```
file_put_contents('outfile', file_get_contents('invalid_file')); // false instead of string
file_put_contents('outfile', fopen('invalid_file', 'r')); // false instead of resource
file_put_contents('outfile', file('invalid_file')); // false instead of array
```
2021-11-21 20:57:45 +00:00
orklah
46139272f6
Merge pull request #6952 from orklah/null_propagation_in_return
...
fix null propagation in return
2021-11-21 21:53:50 +01:00
orklah
3e56e859a9
fix inheritance
2021-11-21 21:53:24 +01:00
orklah
41fd460db5
check __callStatic purity instead of the pseudoMethod purity
2021-11-21 13:51:19 +01:00
orklah
6bdadfe0cb
fix null propagation in return
2021-11-21 13:18:26 +01:00
Bruce Weirdan
f2aa9ca1de
Merge pull request #6949 from mallardduck/callmap-stream_get_meta_data
2021-11-21 09:45:30 +02:00
MallardDuck
8292967ec4
Update crypto to use object-like array
2021-11-20 23:56:29 -05:00
MallardDuck
25cd14fe12
correct callmaps for stream_get_meta_data return
2021-11-20 12:16:22 -05:00
Bruce Weirdan
cd489407a0
Merge pull request #6946 from sebkehr/fix_cannot_extend_constrained_with_imported_alias
2021-11-19 22:24:40 +02:00
Sebastian Kehr
511ed99e46
expand type aliases when comparing unions
2021-11-19 14:15:38 +01:00
Bruce Weirdan
6097e02773
Merge pull request #6529 from boesing/bugfix/class-constant-reconciliation
2021-11-18 00:23:42 +02:00