1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
Commit Graph

12024 Commits

Author SHA1 Message Date
Peter van Dommelen
05f28ce8cd Do not widen type to mixed and lose the existing type information when an Any assertion is used.
Fixes #8084.
2022-09-18 17:02:09 +02:00
orklah
8185260126
Merge pull request #8490 from tvdijen/setAttributeNS
Add null-type to several DOM-functions
2022-09-18 13:55:41 +02:00
Tim van Dijen
2a315bef45 Fix some more 2022-09-18 11:53:09 +02:00
Tim van Dijen
3b737480bd Fix CallMap_historical 2022-09-18 11:51:39 +02:00
Tim van Dijen
eb93f69251 Add null-type to several DOM-functions 2022-09-18 11:51:36 +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
orklah
89b034acaf
Merge pull request #8492 from HypeMC/consistent-docs-examples
Make template constraints examples in docs consistent
2022-09-18 11:23:21 +02:00
orklah
1f1fc47d6f
Merge pull request #8493 from HypeMC/object-properties
Document the object with properties syntax
2022-09-18 11:22:00 +02:00
orklah
3724a8357a
Merge pull request #8489 from hirokinoue/fix-array_key_exists-false-positive
Fix array_key_exists first argument false positive
2022-09-18 11:20:58 +02:00
HypeMC
014cddb9dd Document the object with properties syntax 2022-09-17 23:46:19 +02:00
HypeMC
ee16caf596 Make template constraints examples in docs consistent 2022-09-17 22:20:01 +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
2f870776e2 add test case derived from issue #7428 2022-09-17 23:02:25 +09:00
hirokinoue
faf4e8ef84 allow PropertyFetch node to behave like Variable node 2022-09-17 22:36:16 +09:00
hirokinoue
a2118c65d3 add test case reproducing issue #7428 2022-09-17 22:11:28 +09:00
kkmuffme
b701c7074b fix tests for detailed $_SERVER 2022-09-15 19:39:02 +02:00
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