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

12239 Commits

Author SHA1 Message Date
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
orklah
f31f7beba5
Merge pull request #8480 from d-claassen/psalter-throws-namespaced-exception
Make Psalter add `@throws` annotation with properly namespaced exception
2022-09-19 21:31:50 +02:00
dennis
3a6b709845 Test to describe use statements being applied 2022-09-19 21:09:45 +02:00
dennis
ab690df4da Improved class name generation for @throws annotation 2022-09-19 21:09:45 +02:00
dennis
8ffc747349 Add test to document cross namespace behaviour 2022-09-19 21:09:45 +02:00
dennis
b88d2890e2 Fix existing tests 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
dennis
44785fadfc Introduce test with code inside namespace 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
028ac7f540
Merge pull request #8494 from pvandommelen/fix_any_type_widening
Fix type widening when `Any` assertion is used
2022-09-18 19:35:07 +02:00
Peter van Dommelen
2eb4ca0e3b Within the reconciler's fast path, do not require the existing type to include mixed when handling an Any assertion. 2022-09-18 17:07:30 +02:00
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