1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-12 09:19:40 +01:00
Commit Graph

11856 Commits

Author SHA1 Message Date
kkmuffme
a3cb10c085 make $_SERVER more detailed 2022-09-15 19:39:02 +02:00
kkmuffme
5c39e66b15 fix tests 2022-09-15 19:38:51 +02:00
kkmuffme
7bc29a91eb make superglobals more specific
Update VariableFetchAnalyzer.php
2022-09-15 19:38:51 +02:00
orklah
9ed9c4b64c
Merge pull request #8462 from VincentLanglet/dateTimeModify
Add dateTimeModify return type provider
2022-09-14 20:43:58 +02:00
AndrolGenhald
be3a88df41
Merge pull request #8478 from gsteel/correct_date_get_last_errors_return_type
`date_get_last_errors()`, `DateTime::getLastErrors()` may return false
2022-09-13 20:31:21 -05: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
George Steel
17ca8ef014
date_get_last_errors(), DateTime::getLastErrors() may return false
Up to PHP 8.2, these functions return false if no previous date operations have been performed. In PHP 8.2, false is returned after a date operation that yields neither warnings nor errors:

https://3v4l.org/HBq0q
https://3v4l.org/3QsKY
Signed-off-by: George Steel <george@net-glue.co.uk>
2022-09-13 23:51:32 +01:00
Matthew Brown
d957ff2015
Fix mixed type hole when sending Foo<string> to Foo<mixed> (#8481)
* Fix mixed type hole when sending Foo<string> to Foo<mixed>

* Fix ifThisIs test

* Suppress bugs highlighted with fix

* Fix PHPDoc parsing
2022-09-13 13:13:06 -04:00
Matt Brown
95bb71f8a2 Support PHP 7.1 in require-dev restriction 2022-09-13 12:39:15 -04:00
Matt Brown
7429bc203e Ignore php-parser issue 2022-09-13 12:35:16 -04:00
Matt Brown
6f298d2af2 Fix phpcs violations 2022-09-13 12:33:47 -04:00
Matthew Brown
4b2841580e
Pin version of PHPStan phpdoc parser for slevomat rules 2022-09-13 09:50:21 -04:00
orklah
3748499a8d
Merge pull request #8415 from kkmuffme/consistent-error-logging-for-cache
Consistent error logging for cache
2022-09-11 23:12:33 +02:00
kkmuffme
62df25a741 fix test cache inconsistency 2022-09-11 10:28:16 +02: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
orklah
5108834088
Merge pull request #8136 from sergkash7/patch-1
Update phpredis.phpstub
2022-09-09 07:47:53 +02:00
orklah
5cf6fb3574
Merge pull request #8468 from kkmuffme/class-alias-should-not-be-case-insensitive
classlike_alias incorrect casing not handled correctly
2022-09-08 23:03:17 +02:00
orklah
eba63a3821
Merge pull request #8367 from kkmuffme/revert-nullable-curl_multi_getcontent
partial revert nullable type for curl_multi_getcontent
2022-09-08 22:58:29 +02:00
kkmuffme
6e4c1823d6 partial revert nullable type for curl_multi_getcontent
Fix https://github.com/vimeo/psalm/issues/8351

Partially reverts f28ac73777
2022-09-08 21:46:15 +02:00
kkmuffme
4c6abccfb2 fix tests 2022-09-08 21:33:06 +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
f84e7af826
Merge pull request #8432 from alcaeus/mongodb-stub-corrections
Update call maps for MongoDB extension
2022-09-08 20:30:22 +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
orklah
6374a9637e
Merge pull request #8465 from kkmuffme/invalid-class-casing-for-native-and-stubbed-classes
report invalidCasing when using a class that is not user defined too
2022-09-08 19:59:00 +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
1a10654cb3 fix tests 2022-09-08 13:28:43 +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
AndrolGenhald
18f285f698
Merge pull request #8466 from fluffycondor/ctype-digit-asserts-not-all-numeric-strings
Fix ctype_digit assertion bug
2022-09-07 10:51:18 -05:00
Semyon
f0a8810cf5 Fix ctype_digit assertion bug 2022-09-07 15:49:35 +03:00
orklah
cfe7fd1a53
Merge pull request #8450 from fluffycondor/ctype-functions-assertions
Make ctype_digit and ctype_lower work as assertions
2022-09-05 18:42:55 +02:00
orklah
82be35930f
Merge pull request #8451 from sashashura/patch-1
GitHub Workflows security hardening
2022-09-05 18:40:00 +02:00
Alex
a6710791e4
Update build-phar.yml
Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>
2022-09-02 19:16:42 +01:00
Semyon
969c7a098b Make ctype_digit and ctype_lower work as assertions 2022-09-02 17:37:10 +03:00
AndrolGenhald
faf106e717
Merge pull request #8444 from SCIF/bugfix-8439
trim(), ltrim(), rtrim() now keep lowercase string attribute
2022-08-31 08:47:09 -05:00
Aleksandr Zhuravlev
d7097281ba trim(), ltrim(), rtrim() now keep lowercase string attribute 2022-08-31 21:02:20 +12:00
orklah
1eeea7c21d
Merge pull request #8428 from den-kuz/4.x
Allow any attribute for complex types in schema
2022-08-28 14:04:10 +02:00
Andreas Braun
48bf5496d8
Add missing parameter type for Serializable::unserialize 2022-08-26 10:03:08 +02:00
Andreas Braun
5b8f611e73
Handle tentative return types for interfaces correctly 2022-08-25 15:27:04 +02:00
Andreas Braun
6a6922d29e
Update call maps for MongoDB extension 2022-08-25 14:35:54 +02:00
AndrolGenhald
2fdcd5a5fc
Merge pull request #8436 from TimWolla/attribute-target
Configure a correct attribute target in stubs/CoreGenericClasses.phpstub
2022-08-24 16:59:40 -05:00
Tim Düsterhus
3c2018a1e0 Configure a correct attribute target in stubs/CoreGenericClasses.phpstub 2022-08-24 21:32:26 +02:00
AndrolGenhald
88d33828d8
Merge pull request #8435 from VincentLanglet/arrayReduce
Add support for callable in array_reduce
2022-08-24 09:44:08 -05:00
Vincent Langlet
6bc714c867 Add support for callable in array_reduce 2022-08-24 16:04:22 +02:00
AndrolGenhald
034a796f84
Merge pull request #8431 from LeSuisse/bin2hex-base64-stub
Allow *bin2hex and *bin2base64 functions to keep non-empty-string type
2022-08-23 09:47:18 -05:00