Barney Laurance
88276d7f1e
Fix error message for call to internal method from root namespace
2021-08-17 18:54:57 +01:00
Maximilian Bösing
cb244d5c1e
bugfix: add missing TNonEmptyMixed
to Atomic#create
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-08-17 10:46:45 +02:00
Bruce Weirdan
f245c4ace7
Prevent failures when parsing in-array assertions
...
Fixes vimeo/psalm#6309
2021-08-16 01:23:48 +03:00
orklah
1e17069c24
Change > assertion back to @ and put back a perf threshold
2021-08-15 10:13:05 +02:00
Bruce Weirdan
a9ead63ae1
Revert "Assertions for Integer Range"
2021-08-14 18:06:41 +03:00
Matthew Brown
6cc5ba970a
Fix tests
2021-08-14 10:45:32 -04:00
Matthew Brown
a4479761a7
Fix #3660 - ensure mixed percentage for file never drops below 0
2021-08-14 10:35:31 -04:00
Thomas Bley
04177496cc
Fixed ReflectionException: Class \LanguageServerProtocol\TextDocumentContentChangeEvent does not exist
2021-08-14 05:54:36 +02:00
Bruce Weirdan
7ff2a660dd
Merge pull request #6233 from supersmile2009/fix-in-array-assert
2021-08-13 01:39:31 +03:00
Bruce Weirdan
568a9e0412
Prevented empty assertions
...
and simplified the code a bit.
2021-08-13 00:39:24 +03:00
Bruce Weirdan
6294e06955
Improve constant array inference
...
This fixes int offset inference and adds handling for array unpacks in
constant arrays. Mostly it's copy/pasted from `ArrayAnalyzer` with
further adjustments.
Fixes vimeo/psalm#6263
Fixes vimeo/psalm#6289
2021-08-12 20:39:21 +03:00
Bruce Weirdan
8f85f580da
Extract item handling
2021-08-11 01:18:23 +03:00
Bruce Weirdan
f9a75983f9
Use ArrayCreationInfo for is_list flag
2021-08-11 00:47:45 +03:00
Bruce Weirdan
b6ade31dd0
Use ArrayCreationInfo for can_create_objectlike flag
2021-08-11 00:39:56 +03:00
Bruce Weirdan
ba4f1db2cd
Use ArrayCreationInfo for class strings
2021-08-11 00:29:14 +03:00
Bruce Weirdan
47d3d31c47
Use ArrayCreationInfo for property types
2021-08-11 00:19:18 +03:00
Bruce Weirdan
abe5ef774c
Use ArrayCreationInfo for key and value types
2021-08-11 00:05:00 +03:00
Bruce Weirdan
a64a30cdda
Combine value types at once
2021-08-10 21:30:57 +03:00
Bruce Weirdan
a41d5c5b4f
Combine offset types at once
2021-08-10 21:23:13 +03:00
Bruce Weirdan
cf28859faf
Extract array type inference
2021-08-10 20:48:45 +03:00
Alexandr Zolotukhin
d7f83c3b5e
Fix issues detected by psalm
2021-08-10 20:07:53 +03:00
Bruce Weirdan
5dc748d372
Merge pull request #6273 from VincentLanglet/nonEmptyConstant
...
Constants are non empty strings
2021-08-09 23:36:41 +03:00
Bruce Weirdan
868a1672c1
Merge pull request #6253 from orklah/unusedSuppress
2021-08-09 23:34:14 +03:00
Bruce Weirdan
94f034b7ad
Merge pull request #6272 from orklah/sealed-array-combination
2021-08-09 23:33:00 +03:00
orklah
b975dd7f73
add documentation
2021-08-09 21:59:29 +02:00
Vincent Langlet
b28316c27c
Declare some constant as non empty
2021-08-09 21:39:49 +02:00
orklah
5134747edd
CS
2021-08-09 20:46:15 +02:00
orklah
e688781383
seal the result of two sealed KeyedArrays
2021-08-09 20:43:17 +02:00
Bruce Weirdan
2431d162a9
Merge pull request #6251 from TysonAndre/reset-cache-level
...
Use different psalm cache for different error levels
2021-08-08 21:28:27 +03:00
bjscharp
07d48d779a
Merge branch 'master' into callmap-delta-inconsistencies
2021-08-08 10:41:42 +02:00
bjscharp
96056d329f
Add simple test to verify outout of getCallMap method
...
Convert deltafile format to new style proposed by weirdan
Modify CallMapTest to use new format
Modify InternalCallMapHandler to use new format
Move assertions to base testcase
2021-08-08 10:39:54 +02:00
orklah
2253667bd5
fix CS, remove redundant vars
2021-08-07 00:22:47 +02:00
orklah
b194291bb3
try to fix offsets
2021-08-07 00:08:19 +02:00
Maximilian Bösing
9d59fbe6bb
feature: introduce literal float methods to Union
type
...
- Added `Psalm\Type\Union#isSingleFloatLiteral`
- Added `Psalm\Type\Union#getSingleFloatLiteral`
- Added `Psalm\Type\Union#hasLiteralFloat`
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-08-06 21:05:26 +02:00
Tyson Andre
3486490080
Use different psalm cache for different error levels
...
Fixes #4952
2021-08-06 12:46:15 -04:00
Alexandr Zolotukhin
65a129e3c2
Fix type reconciliation for complex cases with union types
2021-08-06 00:13:26 +03:00
Alexandr Zolotukhin
9687836519
Fix intersection calculation for unions of scalar types
2021-08-05 23:15:58 +03:00
orklah
3fe678b914
ignore UnnecessaryVarAnnotation
2021-08-05 21:05:44 +02:00
orklah
c706497cbd
restrict types
2021-08-04 19:45:25 +02:00
orklah
0c75ac89d0
refactor arithmetics
2021-08-04 19:43:27 +02:00
Alexandr Zolotukhin
6dd24285c5
Return Empty type if there's no intersection between existing and assertion type
2021-08-03 21:10:59 +03:00
Bruce Weirdan
2ecd1d8bd3
Merge pull request #6238 from orklah/unused-foreach-fixable
...
don't flag UnusedForeachValue as fixable
2021-08-03 19:37:07 +03:00
Alexandr Zolotukhin
586e8a157e
Fix tests with loose types. Fix return type in the reconciler.
2021-08-03 19:34:35 +03:00
orklah
006088d578
don't flag UnusedForeachValue as fixable
2021-08-03 18:24:53 +02:00
Alexandr Zolotukhin
097e88a7cb
Improved in_array assertion extraction
...
Extract non-literal type assertion from in_array
Extract false, true and null assertion
Fix assertion against arrays with union-typed values
Fix assertion against non-sealed arrays
2021-08-03 17:29:32 +03:00
Bruce Weirdan
9d68e2e39c
Merge pull request #6231 from tm1000/patch-get-position-from-offset-error-php80
2021-08-03 04:06:02 +03:00
Your Name
9f3f366cf3
Fixes: PHP 8.0: Argument #3 ($offset) must be contained in argument #1 ($haystack)
2021-08-02 16:49:09 -07:00
Bruce Weirdan
caaff6e3b4
Merge pull request #6210 from orklah/int-range3
2021-08-01 16:37:15 +03:00
Bruce Weirdan
3a1714e732
Merge pull request #6215 from weirdan/fix-6211
...
Use fully-qualified name for virtual class strings
2021-08-01 16:36:25 +03:00
Matthew Brown
00c062267d
Fix space
2021-07-31 21:15:26 -04:00