Steven Dickinson
68f6ba873e
Fix MinMaxReturnTypeProvider when handling TDependentListKeys
2022-10-11 14:13:40 +01:00
orklah
60129819f5
add import
2022-10-10 18:10:49 +02:00
orklah
0f6891c757
fix typo
2022-10-10 18:07:26 +02:00
kkmuffme
3a420f4f7a
phpunit bool|string
2022-10-10 17:06:00 +02:00
kkmuffme
0da493b5bb
fix docs to match example
2022-10-10 16:28:46 +02:00
kkmuffme
1e6019ddde
size and error in $_FILES more specific
2022-10-10 16:18:27 +02:00
kkmuffme
fa53050483
fix $_FILES
2022-10-10 16:07:14 +02:00
kkmuffme
b5f6da7285
add common phpunit $_SERVER values bool
...
Fix https://github.com/vimeo/psalm/issues/8556
2022-10-10 14:31:35 +02:00
Gregory Hargreaves
41a6afda32
Add check for const with reserved word class
2022-10-07 09:44:10 +01:00
William Owen Ponce
0c3a62bc48
Update args
2022-10-05 14:29:24 +08:00
William Owen O. Ponce
ae426a00ce
Remove irrelevant types, use keep aliases
2022-10-05 09:09:56 +08:00
William Owen O. Ponce
04c9fe89c1
Arrange use statements alphabetically again
2022-10-04 09:59:34 +08:00
William Owen O. Ponce
6b6c320fe6
Arrange use statements alphabetically
2022-10-04 09:53:22 +08:00
William Owen O. Ponce
58fd83a01f
Add int type aliases based on existing codes
2022-10-04 09:47:40 +08:00
orklah
313ebf428b
Merge pull request #8502 from kkmuffme/option-to-only-report-errors-for-passed-file
...
add hideAllErrorsExceptPassedFiles config option
2022-09-25 13:02:00 +02:00
kkmuffme
b1c0c2d8a1
add hideAllErrorsExceptPassedFiles config option
...
for files only (not directories, since that wouldn't make practical sense)
2022-09-24 10:44:01 +02:00
kkmuffme
e803af4cd4
use cache for declared function when available before falling back to stubs
...
fixes return type issues reported for the wrong file
2022-09-22 02:10:51 +02:00
kkmuffme
d69be4b9a2
objects even with __toString methods cannot be cast to int/float
2022-09-19 21:54:16 +02:00
Ricardo Boss
bf1c0320fd
Cherry-pick: Try to provide literal int types when possible ( fixes #6966 ) ( #7071 )
...
* Fixed vimeo/psalm#6966
* Only accept >= 0 values for mode argument in round()
* Made round() only return float or literal float values and remove unneeded test
* Registered RoundReturnTypeProvider
* Updated cast analyzer to handle single string literal int values as literal ints
* Fixed psalm errors
* Fix invalid property accesses
* Addressed comments
* Added Tests
* Marked RoundReturnTypeProvider as internal
* Fixed CS
2022-09-19 21:54:16 +02:00
kkmuffme
da68e9d739
fix psalm-internal risky casts
2022-09-19 21:54:16 +02:00
kkmuffme
7cdad99645
add RiskyCast
2022-09-19 21:54:16 +02:00
kkmuffme
c3eebe2579
be less strict for generic string type
2022-09-19 21:54:16 +02:00
kkmuffme
d32efb0619
float/int always 1 on "error", no PossiblyInvalidCasts by default
2022-09-19 21:54:16 +02:00
kkmuffme
39ec75523e
same for float
2022-09-19 21:54:16 +02:00
kkmuffme
3bec76acb8
fix invalid casts for int
...
https://psalm.dev/r/0d284c6f48
2022-09-19 21:54:16 +02:00
kkmuffme
e4b7cdf26f
fix type for (string) true
2022-09-19 21:54:16 +02:00
dennis
ab690df4da
Improved class name generation for @throws annotation
2022-09-19 21:09:45 +02:00
dennis
844d7999c5
Ensure @throws annotations reference valid Exception classes
2022-09-19 21:09:45 +02:00
orklah
3b7e508c78
Merge pull request #8473 from kkmuffme/detailed-superglobal-types
...
make superglobals more specific
2022-09-19 10:48:44 +02:00
kkmuffme
e2e6265ba1
ignore nullable issues for $argv/$argc
2022-09-19 09:45:55 +02:00
orklah
5db59910bd
Merge pull request #8491 from HypeMC/array-column-fix
...
Fix array_column with object and column name null
2022-09-18 11:25:42 +02:00
HypeMC
602e26edd4
Fix array_column with object and column name null
2022-09-17 21:21:33 +02:00
hirokinoue
9071e877a8
fix according to psalm analysis
2022-09-18 01:15:09 +09:00
hirokinoue
2cf131fb45
allow StaticPropertyFetch node to behave like Variable node
2022-09-17 23:08:29 +09:00
hirokinoue
faf4e8ef84
allow PropertyFetch node to behave like Variable node
2022-09-17 22:36:16 +09:00
kkmuffme
a3cb10c085
make $_SERVER more detailed
2022-09-15 19:39:02 +02:00
kkmuffme
7bc29a91eb
make superglobals more specific
...
Update VariableFetchAnalyzer.php
2022-09-15 19:38:51 +02:00
Vincent Langlet
fec5c8ab03
Fix cs
2022-09-14 00:55:32 +02:00
Vincent Langlet
32aedbac58
Add dateTimeModify return type provider
2022-09-14 00:53:12 +02:00
Matt Brown
6f298d2af2
Fix phpcs violations
2022-09-13 12:33:47 -04:00
kkmuffme
978f37e421
improve unlinking potential race condition
...
* fix rare race condition on file cache unlink
* remove unnecessary reset()
* improve code readability using variable
2022-09-11 10:28:16 +02:00
kkmuffme
8ac86f0a4d
use consistent race condition dir creation code in all places in cache
2022-09-11 10:28:16 +02:00
kkmuffme
4726454f49
update leftover md5 in provider to commonly used hash
...
Revert "update leftover md5 in provider to commonly used hash"
This reverts commit 66337ecf50446dca8650a0812ebfe516d1993e06.
partially put back
Update StatementsProvider.php
2022-09-11 10:22:48 +02:00
kkmuffme
8da5f5eb1a
use exceptions instead of error_log for ParserCacheProvider
...
* use exceptions instead of error_log for ParserCacheProvider like all other cache providers do
* remove duplicate code in ParserCacheProvider
* use same hash as other cache providers
* update Config.php cache directory creation to use same code as ParserCacheProvider
2022-09-11 10:22:48 +02:00
kkmuffme
c450d95727
fix inconsistent function naming
2022-09-08 21:33:06 +02:00
kkmuffme
249d61ec1b
classlike_alias incorrect casing not handled correctly
2022-09-08 21:33:06 +02:00
orklah
76cfb911b2
Merge pull request #8469 from kkmuffme/strictify-anchored-preg-replace
...
preg_replace with anchor will always only have 1 replacement
2022-09-08 20:01:16 +02:00
kkmuffme
d0984f4e47
fix psalm internal errors reported by new checks
2022-09-08 19:35:44 +02:00
kkmuffme
15046c932b
preg_replace with anchor will always only have 1 replacement, add limit for clarity and performance
2022-09-08 18:51:33 +02:00
kkmuffme
a17fa249ac
report invalidCasing when using a class that is not user defined too (e.g. new DateTime)
2022-09-08 13:28:43 +02:00