1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00
Commit Graph

7491 Commits

Author SHA1 Message Date
Marcus Bointon
fb505df807
Fix preg_match_all stub (#4325)
* preg_match_all can return false

* Test for preg_match_all returning false

* Fix test

* Add @psalm-ignore-falsable-return
2021-01-29 11:39:55 +01:00
Matt Brown
d4ccfcf75d
Use correct count 2021-01-29 11:39:55 +01:00
Matt Brown
8d1de7757d
Use more accurate arguments count 2021-01-29 11:39:55 +01:00
Matt Brown
c00bc4ee51
Add better support for get_debug_type 2021-01-29 11:39:54 +01:00
Matt Brown
0f8b017384
Prevent features pre-php-8 2021-01-29 11:39:54 +01:00
Matt Brown
66e40f1007
Support false and null unions in PHP 8 signatures 2021-01-29 11:39:54 +01:00
Matt Brown
4acaf40f26
Avoid crash when callable type is missing 2021-01-29 11:39:54 +01:00
Matt Brown
28a87c8b9f
Change control_flow_graph to data_flow_graph 2021-01-29 11:39:54 +01:00
Matt Brown
052abce035
Rename ControlFlowGraph to more appropriate DataFlowGraph 2021-01-29 11:39:54 +01:00
Pol Dellaiera
9aaf61d220
CachingIterator - Add forgotten constructor parameter. (#4322)
Signed-off-by: Pol Dellaiera <pol.dellaiera@protonmail.com>
2021-01-29 11:39:54 +01:00
Pol Dellaiera
2b437ad672
Add more standard iterators (#4320)
* Add CachingIterator, LimitIterator, InfiniteIterator, CallbackFilterIterator, NoRewindIterator.

Signed-off-by: Pol Dellaiera <pol.dellaiera@protonmail.com>

* Add related Iterator tests.

Signed-off-by: Pol Dellaiera <pol.dellaiera@protonmail.com>
2021-01-29 11:39:54 +01:00
Matt Brown
399a7bfd11
Fix #4315 - prevent crash when setting unknown property in finally 2021-01-29 11:39:54 +01:00
Matt Brown
278a306681
Do arithmetic for preg_split arguments 2021-01-29 11:39:53 +01:00
Matt Brown
e999728892
Improve preg_split return more 2021-01-29 11:39:53 +01:00
Matt Brown
23d1571d2a
Fix #4252 - fix xml generation 2021-01-29 11:39:53 +01:00
orklah
d6c64eef25
param types (#4313) 2021-01-29 11:39:53 +01:00
Matt Brown
8338656b1f
Remove deleted path 2021-01-29 11:39:53 +01:00
Matt Brown
78380c591b
Fix #4274 - don’t ignore mixed union in array_shift operation 2021-01-29 11:39:53 +01:00
orklah
6e3546d900
return types (#4311)
* return types

* remove willReturn for void methods
2021-01-29 11:39:53 +01:00
Matt Brown
bb42c12d7b
Fix #4310 - prevent literal class check on union 2021-01-29 11:39:53 +01:00
Matt Brown
3d7423dc70
Add slash 2021-01-29 11:39:53 +01:00
Matt Brown
eb89e0142f
Fix #4309 - improve reuse of callmap callable inference 2021-01-29 11:39:52 +01:00
Matt Brown
68526c39ad
Add better return type for preg_split 2021-01-29 11:39:52 +01:00
Matt Brown
0934988ec7
Don’t merge array and Traversable to iterable when there are intersections 2021-01-29 11:39:52 +01:00
Matt Brown
d6f8a658bf
Change name to arraylike-object 2021-01-29 11:39:52 +01:00
Matt Brown
98d8f5d7b2
4.x - Add support for array-like-object
Ref #4308
2021-01-29 11:39:52 +01:00
Matt Brown
aaed95a0a9
4.x - Prevent passing empty array to max or min 2021-01-29 11:39:52 +01:00
Matt Brown
6310aff7e5
4.x - skip Stringable test if not in PHP 8.0 2021-01-29 11:39:52 +01:00
Matt Brown
76a2158d37
Make docblocks compatible with PHP 8 2021-01-29 11:39:52 +01:00
Matt Brown
1a4292b992
4.x - fix callmap regressions 2021-01-29 11:39:52 +01:00
Matt Brown
056f546a38
4.x - detect falty !is_resource checks 2021-01-29 11:39:51 +01:00
Matt Brown
88284c2b3d
4.x - add support for PHP 8 callmap 2021-01-29 11:39:51 +01:00
Matt Brown
36ed769b9f
Add more fixes 2021-01-29 11:39:51 +01:00
Matt Brown
df98750963
Fix order 2021-01-29 11:39:51 +01:00
Matt Brown
3558a66a12
Add changes from PHPStan‘s functionmap 2021-01-29 11:39:51 +01:00
Matt Brown
a531c2e450
Move static code out of src 2021-01-29 11:39:51 +01:00
Matt Brown
01781af718
Fix #4306 - negating positive-numeric is useless, avoid crash 2021-01-29 11:39:51 +01:00
Matt Brown
4f5a3ca82b
Fix #4299 - only allow unpacking for the zeroeth-indexed element 2021-01-29 11:39:51 +01:00
Matt Brown
6bd6a4cbc3
Ignore precondition issues in loop 2021-01-29 11:39:51 +01:00
Matt Brown
96af3e041c
Unbreak CI 2021-01-29 11:39:50 +01:00
Matt Brown
8d63dfec0a
Convert numeric literal strings to their int/float equivalents for numeric operations 2021-01-29 11:39:50 +01:00
Matt Brown
f1be27b18a
Fix addition of int and string type 2021-01-29 11:39:50 +01:00
Matt Brown
5c1fcf403c
Fix #4297 - use correct property id for each different MissingConstructor error 2021-01-29 11:39:50 +01:00
Matt Brown
49dcec6d4a
Fix #4287 - intersection of regular arrays should not result in crash 2021-01-29 11:39:50 +01:00
Matt Brown
b0c3f09c29
Improve accuracy of messages 2021-01-29 11:39:50 +01:00
Matt Brown
3f5cb4db1f
Warn about impossible/redundant conditions in RHS of || 2021-01-29 11:39:50 +01:00
Matt Brown
d1b81e9b80
Improve error message 2021-01-29 11:39:50 +01:00
Matt Brown
0c0d0f9724
Use better locations for errors 2021-01-29 11:39:50 +01:00
Matt Brown
2a755cce8c
Always check LHS of or condition before applying to RHS 2021-01-29 11:39:49 +01:00
Matt Brown
44a3f2d084
Improve message even more 2021-01-29 11:39:49 +01:00