kkmuffme
e482c078a7
code style whitespace fixes including for unrelated tests
2024-02-20 22:28:12 +01:00
kkmuffme
9d8080096c
Fix RiskyTruthyFalsyComparison reporting irrelevant errors when there is no explicit truthy/falsy type
2024-02-20 22:28:12 +01:00
Bruce Weirdan
b2aebd90a7
Fix test by preloading interface
2024-01-29 22:43:05 +01:00
Bruce Weirdan
6e2effaf9a
key_exists()
is an alias for array_key_exists()
...
Fixes vimeo/psalm#10346
2024-01-27 13:41:43 +01:00
kkmuffme
5643cf53d4
fix mixed test not actually checking mixed (since superglobals have a more specific type now)
2024-01-15 10:11:22 +01:00
kkmuffme
93dc2219e0
fix bugs in tests
2024-01-15 10:11:22 +01:00
kkmuffme
fb93aede12
create a separate issue type
2024-01-15 10:11:21 +01:00
kkmuffme
f3543ca9ab
add the fix for empty() too and fix empty returning bool on true/false only cases hiding errors when functions called
2024-01-15 10:11:21 +01:00
kkmuffme
d5b713e439
Fix https://github.com/vimeo/psalm/issues/10501 - report error for non-strict comparison on truthy+falsy union
2024-01-15 10:11:21 +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
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
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
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
kkmuffme
82f71a7ccb
add test
2022-12-31 00:18:08 +01:00
orklah
6353143eaf
Merge pull request #9021 from orklah/nonempty-reconcile
...
Non empty reconciliation
2022-12-29 22:35:12 +01:00
orklah
790c30959d
Merge pull request #9016 from Ocramius/feature/#5039-more-refined-types-for-explode-core-function
...
Refined `explode()` types
2022-12-29 10:23:18 +01:00
orklah
907729d83a
remove useless imports
2022-12-29 01:00:06 +01:00