orklah
cc6ab8340b
improve type when min = max and add test
2021-09-23 21:24:16 +02:00
orklah
a7fa63547e
add tests, improve count behaviour on keyed arrays using integer range
2021-09-23 21:24:16 +02:00
orklah
60f017410c
Merge pull request #6526 from orklah/fix-build
...
fix build
2021-09-23 19:37:06 +02:00
orklah
c74e81ca8f
fix build
2021-09-23 19:29:15 +02:00
orklah
55fd9c6713
Merge pull request #6478 from whsv26/bugfix/trait-template-invalid-arg
...
Fix invalid argument bug in generic trait context
2021-09-20 16:53:12 +02:00
orklah
994c927b6a
Merge pull request #6445 from TysonAndre/negate-in_array-v2
...
Fix false positive ParadoxicalCondition in negation of in_array
2021-09-20 16:49:15 +02:00
orklah
7328456a33
Merge pull request #6438 from SCIF/serializable-interface
...
Changed signature of Serializable::unserialize stub
2021-09-20 16:49:00 +02:00
orklah
90e1662964
Merge pull request #6241 from orklah/range5
...
Range arithmetics and assertions
2021-09-20 07:15:43 +02:00
orklah
f87bd56105
fix Pow
2021-09-19 19:30:03 +02:00
orklah
5a2df475ca
changes after review
2021-09-19 19:30:03 +02:00
orklah
3d7dc740c2
fix UnaryMinus
2021-09-19 19:30:03 +02:00
orklah
a6630c49a2
fix mod calculation with ranges
2021-09-19 19:30:02 +02:00
orklah
c226285a4b
fix Mul and Pow operations
2021-09-19 19:30:02 +02:00
orklah
a8a659895f
add failing test
2021-09-19 19:30:02 +02:00
orklah
f789ab0655
add test and allow checking in already inferred types instead of just relying on statements from PHPParser for assertions
2021-09-19 19:30:02 +02:00
orklah
ae0586b0e6
fix shift inference
2021-09-19 19:30:02 +02:00
orklah
e0e34bec33
allow intersections and add test
2021-09-19 19:30:02 +02:00
orklah
c26f403e7e
fix an old bug with inverting positive int + allow inverting TIntRange
2021-09-19 19:30:02 +02:00
orklah
488c13b7c5
handle bit operations and add test
2021-09-19 19:30:02 +02:00
orklah
6f050359ce
refactor int vs int range arithmetic by converting everything to range and add tests
2021-09-19 19:30:02 +02:00
orklah
d2f73d3adb
fix and test minus case
2021-09-19 19:30:01 +02:00
orklah
b5b2677ee3
allow negating inferiorto/superiorto
2021-09-19 19:30:01 +02:00
orklah
b3a62c76dd
add tests and use getNewHighestBound at one place
2021-09-19 19:30:01 +02:00
orklah
edff17134d
improve test
2021-09-19 19:30:00 +02:00
orklah
7d6ede61fd
fix test
2021-09-19 19:30:00 +02:00
orklah
ee75586fbf
expand test and fix assertions
2021-09-19 19:30:00 +02:00
orklah
d2e1388473
Allow inferior-to and superior-to even with negated numbers
2021-09-19 19:30:00 +02:00
orklah
d9d9fa67a6
remove faulty test
2021-09-19 19:29:59 +02:00
orklah
3a8afe07be
fix test
2021-09-19 19:29:59 +02:00
orklah
1dcdaea117
int range arithmetics
2021-09-19 19:29:59 +02:00
orklah
e9f3d5ba06
assert from TClassString
2021-09-17 20:05:25 +02:00
Aleksandr Zhuravlev
65407cc10d
Got rid of test
2021-09-16 23:07:32 +12:00
whsv26
8b54cca3a8
Fix different context templates invalid argument bug for trait.
2021-09-13 23:43:09 +03:00
Alessandro Lai
55cbbd4fe7
Add test
2021-09-09 16:04:12 +02:00
Bruce Weirdan
beb0476eed
Added test
2021-09-08 22:41:23 +03:00
Bruce Weirdan
b4f024b1fe
Basic enum checks
...
* Duplicate cases
* Duplicate case values
* Invalid case values: value on a pure enum case, missing value on a
backed enum case, backing type / case type mismatch
* Literal expression evaluation for case values
Fixes vimeo/psalm#6426
Fixes vimeo/psalm#6427
2021-09-07 12:35:38 +03:00
Tyson Andre
f4f989d1e5
Use different in-array-*
check for non-literals
...
Negating this would not contradict the original condition if the
variables were different. A string can be in one array of strings but
not be in a different array of strings.
2021-09-06 21:48:08 -04:00
Tyson Andre
f69a255611
Fix false positive ParadoxicalCondition in negation of in_array
...
For #6439
2021-09-06 21:15:04 -04:00
Bruce Weirdan
b39e765475
Prevent failures with dev PHP versions
...
It was failing with dev versions, e.g. `8.2.0-dev`
2021-09-07 01:43:03 +03:00
Nicolas Giraud
9df0edbbab
Force array_walk to not infer input type.
2021-09-06 15:15:25 +02:00
Bruce Weirdan
0f2152ac97
Merge pull request #6434 from weirdan/flag-invalid-enum-backing-type
...
Flag invalid backing types for enums
2021-09-05 20:30:01 +03:00
Bruce Weirdan
7b11024886
Flag invalid backing types for enums
...
Fixes vimeo/psalm#6428
2021-09-05 20:12:24 +03:00
Bruce Weirdan
abf557da44
Encode XML output consistently
...
This fixes test failures when running on PHP 8.1, due to changed
`htmlspecialchars()` defaults
2021-09-05 20:06:59 +03:00
Bruce Weirdan
5dfd157d72
Merge pull request #6420 from orklah/ternary-override-type
...
Ternary override type when reassigning
2021-09-04 21:58:32 +03:00
Bruce Weirdan
b710aab148
Merge pull request #6419 from TysonAndre/in_array-fix
2021-09-04 21:56:36 +03:00
Bruce Weirdan
3a3fde332e
Merge pull request #6392 from orklah/control-action-test
2021-09-04 21:38:08 +03:00
orklah
e2b594820e
fix test
2021-09-04 20:27:25 +02:00
orklah
0825f220fe
allow ternary to override previous type when reassigning
2021-09-04 20:22:06 +02:00
Tyson Andre
58e7ae1809
Also support non-literal types in strict in_array() check
...
Modified approach to #6396 by orklah
Fixes #6333
Co-Authored-By: orklah <ronan_morin@hotmail.com>
2021-09-04 12:34:49 -04:00
orklah
ea50e5db4d
add test
2021-09-04 14:19:49 +02:00