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

376 Commits

Author SHA1 Message Date
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
orklah
ee98fac581 use Atomic to create the types 2022-12-29 00:51:09 +01:00
orklah
5a002c448b fix non-empty reconciliation 2022-12-29 00:49:31 +01:00
orklah
58853c00f8 add test 2022-12-28 19:13:03 +01:00
Marco Pivetta
6341d7fef0 Adjusted existing tests to the new signature of explode()
Note how the signature became `array{0: string, 1?: string, 2?: string, array<int, string>}`,
which may be a side-effect of unions between a defined hashmap structure with array
keys, and `list<string>`.
2022-12-28 17:39:06 +01:00
Vincent Langlet
b1f1ca6d7e Try 2022-12-25 19:11:54 +01:00
Vincent Langlet
a8ef02db5a Real fix 2022-12-25 17:35:47 +01:00
Vincent Langlet
ebd5727dec Update type 2022-12-24 13:38:02 +01:00
Vincent Langlet
723001d814 Failing test 2022-12-24 13:17:08 +01:00
Jack Worman
1c19260cdd Require trailing commas 2022-12-18 13:20:31 -06:00
Jack Worman
a52f35e5e1 Even more property typehints 2022-12-16 13:24:21 -06:00
Leo Viezens
0ef7ec100a #7387 Add asserting non-empty-string by strlen 2022-12-16 17:04:01 +01:00
Jack Worman
2b5407d2fb Added SlevomatCodingStandard.TypeHints.ParameterTypeHint sniff and removed php-cs-fixer 2022-12-14 20:26:17 -06:00
Jack Worman
69658e8315 SlevomatCodingStandard.Commenting.DocCommentSpacing 2022-12-14 13:34:41 -06:00
Jack Worman
643542346b Add codesniffer rules and expand php-cs-fixer to bin and test 2022-12-14 13:29:09 -06:00