1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-03 10:07:52 +01:00
Commit Graph

394 Commits

Author SHA1 Message Date
3f82312ffa Merge remote-tracking branch 'vimeo/5.x' into merge_5.x 2024-01-15 13:08:20 +01:00
c6c7649af3 Fixup 2023-12-19 11:53:41 +01:00
9b8251416f Merge remote-tracking branch 'vimeo/5.x' into HEAD 2023-12-19 10:41:33 +01:00
kkmuffme
dee555daaf filter_input & filter_var return type more specific 2023-12-17 20:34:10 +01:00
kkmuffme
cceb1fb8c4 add missing phpdoc in new tests 2023-12-13 15:21:46 +01:00
kkmuffme
af3978281e remove previously broken test https://github.com/vimeo/psalm/issues/10487 2023-12-13 15:05:48 +01:00
kkmuffme
e6f24d91fd Fix https://psalm.dev/r/aada187f50 where 2 union types are not intersected and the condition contains both types 2023-12-13 14:10:22 +01:00
kkmuffme
108f626712 fix literal int/string comparisons only using one literal
Fix https://github.com/vimeo/psalm/issues/9552
2023-12-13 13:59:26 +01:00
17bf9a45a6 Fixup 2023-12-01 17:46:24 +01:00
147129345e Add failing test 2023-12-01 17:23:35 +01:00
f652cf09d8 Merge branch 'fix_array_key_exists_negation' into fix_literal_union_key 2023-12-01 16:31:24 +01:00
1a4656564a Cleanup 2023-12-01 16:31:01 +01:00
ef169893aa cs-fix 2023-12-01 15:07:55 +01:00
cab7cf0330 Fix 2023-12-01 15:03:24 +01:00
edf2d1e4b6 Fix 2023-12-01 15:03:17 +01:00
7e948419cd Fix array_key_exists negation 2023-12-01 13:37:28 +01:00
9e535682c4 Merge remote-tracking branch 'origin/5.x' into HEAD 2023-11-27 11:54:44 +01:00
kkmuffme
0d7c5a2d8e Fix docblock mixed escape hatch
revert https://github.com/vimeo/psalm/pull/7663 including previous from_docblock Mixed assignments, as the tests required 2 suppressions and created an escape hatch via mixed on higher psalm error levels, where mixed isn't reported, thus hiding potentially fatal bugs.
It's still possible to run the validation of docblock docs though: a @var declaration that contains both possible types, to ensure later code won't escape any checks (and no @psalm-suppress needed at all)

This is also a required preparation to fix some isset issues of https://github.com/vimeo/psalm/issues/9759
2023-11-21 13:01:55 +01:00
kkmuffme
d94f7bd553 loose comparisons of int with string shouldn't change change the int to empty-mixed 2023-11-21 13:01:15 +01:00
RobChett
fb7fc1c569 Remove MixedInferredReturnType as the related issue is more accuratly reported by MixedReturnStatement 2023-11-09 16:22:35 +00:00
robchett
8414d70a77 Better reconciling of ++/-- operators in ints 2023-11-03 21:42:17 +00:00
394e38599d Strict types everywhere 2023-10-19 13:12:06 +02:00
ec959e95d7 Merge remote-tracking branch 'origin/master' into strict_types 2023-10-19 11:28:39 +02:00
orklah
24168f6c58
Merge pull request #9794 from robchett/remove_TCallableArray_and_TCallableList
Improved type of callable-array
2023-10-17 23:38:12 +02:00
robchett
f94df41d76 Fix issues with nullable preg_replace 2023-10-10 00:04:16 +01:00
robchett
889bdca461 The function in a callable-array is a non-empty-string 2023-10-09 19:58:05 +01:00
RobChett
df6b5fbb75 Update tests for new callable-array shape 2023-10-09 18:04:02 +01:00
Yannick Gottschalk
a4de6d9dc0 Fix #9997
- make SimpleXmlElement and SimpleXmlIterator not a universal object crate
- added typed magic __get method to SimpleXmlElement
- adjusted tests to reflect new behaviour of SimpleXmlElement
- added tests
2023-08-05 17:07:08 +02:00
1ad9fc66f8
Fixes 2023-07-25 10:09:29 +02:00
orklah
8929f8b4d8 fix reconciliation between a list and iterable 2023-06-22 23:37:40 +02:00
robchett
7792b6c36c Don't update types of the outer scope when in an elseif conditional 2023-06-17 13:36:29 +01:00
kkmuffme
16aaa3ae2b regex cleanup 2023-06-13 22:07:51 +02:00
baff6fb36a fix is_object assertions 2023-04-20 14:03:35 +02:00
Bruce Weirdan
963dd5d43d
Additional test
This was actually fixed previously
2023-03-18 03:45:09 -04:00
Bruce Weirdan
5a14f84fc7
Clarify testsss 2023-03-18 02:17:36 -04:00
Bruce Weirdan
2a84a63483
Prevent assertion leaks from else
Fixes vimeo/psalm#9395
2023-03-18 02:09:56 -04:00
Paweł Tomulik
388efaf85c
append commas to array items 2023-03-12 18:23:10 +01:00
Paweł Tomulik
fc402b1c95
add tests for #9433 2023-03-12 18:23:07 +01:00
Bruce Weirdan
3f52ded9c3
Correctly process use aliases in @psalm-scope-this
Fixes vimeo/psalm#9386
2023-02-24 00:53:36 -04:00
Yannick Gottschalk
f026226aa3 Fixes #9384 2023-02-23 17:23:46 +01:00
Bruce Weirdan
01c19d94ba
Added a bunch of tests from referenced issues 2023-02-20 23:45:01 -04:00
Bruce Weirdan
ac86981a79
Revert "#7387 Add asserting non-empty-string by strlen"
This reverts commit 0ef7ec100a.
2023-02-20 23:07:22 -04:00
Bruce Weirdan
38cc316ce9
Update tests/TypeReconciliation/ConditionalTest.php 2023-02-19 06:02:12 -04:00
Evan Shaw
a25fe35584 Negated is_numeric narrows scalar type 2023-02-19 22:38:34 +13:00
Bruce Weirdan
3c4a829f71
Fixed more CS issues 2023-02-07 11:20:02 -04:00
Matthew Brown
d450b40da8
Remove some logic that didn't need to be there (#9209)
* Remove check to see what breaks

* Simplify following logic

* Add tests from @kkmuffme‘s branch

* Reduce scope of fix

* Clean up logic a little

* Add failing test

* Improvements

* Fix for non-Paradoxical Condition result
2023-02-03 21:08:16 -05:00
Bruce Weirdan
fb65c79079
Fix newly discovered CS issues 2023-02-02 12:19:22 -04:00
Leo Viezens
7966fd574a
Merge branch 'master' into master 2023-01-30 15:38:29 +01:00
Corey Taylor
66ee278de8 Update conditional test to use filter_input with mixed return 2023-01-15 07:43:26 -06:00
kkmuffme
25cadb6776 add null to tests to fix invalid return type 2023-01-05 09:44:23 +01:00