1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
Commit Graph

4967 Commits

Author SHA1 Message Date
Matt Brown
6fa0da9e37 Fix minor taint analysis bug with nested array assignment 2022-06-21 12:42:32 -04:00
Bitwise Operators
651ad6cb50 release:fix: Change return type of createFromInterface() methods on DateTime and DateTimeImmutable to 'static' so extending classes are recognized. 2022-06-13 14:41:02 +02:00
Bruce Weirdan
de49946e4d
Update empty list/array notation 2022-05-28 16:19:49 -04:00
Bruce Weirdan
ff50516fbd
Post-merge fixes 2022-05-28 15:05:17 -04:00
Bruce Weirdan
e0acf22e40
Merge branch '4.x' into update-master 2022-05-28 14:49:12 -04:00
AndrolGenhald
31b4dceaf4 Improve handling of unsupported references (fixes #8018). 2022-05-26 18:28:23 -05:00
AndrolGenhald
80e94daefb Fix class const issue when using floats declared in future consts (fixes #7973).
- Calculate literal type for float arithmetic instead of only for int arithmetic
 - Fix copy/paste fail causing InvalidConstantAssignmentValue to be marked as fixable
2022-05-20 14:46:05 -05:00
Matt Brown
990887148c Fix #7968 - combine and simplify types where necessary in ternary analysis 2022-05-19 22:32:14 -04:00
hirokinoue
e7005245b8 add test case for implode() 2022-05-14 23:36:51 +09:00
Theodore Brown
4eef964048 Infer object shape when array or scalar is cast to object
Also detect redundant object casts.

Fixes #7916, fixes #7934
2022-05-09 20:31:29 -05:00
hirokinoue
4bb5c38eb6 add test case for usort() 2022-04-29 00:52:37 +09:00
hirokinoue
139948e774 add test case for uksort() 2022-04-29 00:33:08 +09:00
hirokinoue
d4470cc99e add test case for uasort() 2022-04-29 00:18:27 +09:00
hirokinoue
c7b9e1eebb add test case for shuffle() 2022-04-28 23:18:39 +09:00
hirokinoue
db565f1d32 add test case for rsort() 2022-04-28 23:05:33 +09:00
Matt Brown
1e15ed393a Fix merge conflict with attribute tests 2022-04-27 10:31:58 -04:00
Matt Brown
fccc366c1e Merge pull request #7887 from ging-dev/lsp-fixes
improve LSP
2022-04-27 10:13:17 -04:00
Matt Brown
d064d9fc6c Add test 2022-04-27 01:47:02 -04:00
Matt Brown
2ef993928c Document @psalm-ignore-variable-* 2022-04-27 01:46:13 -04:00
Matt Brown
a9e3c1fdc1 Fix namespaced min/max int range keyword issue introduced in #7775. 2022-04-27 01:44:57 -04:00
Matt Brown
402280d4f9 Merge pull request #7791 from ohader/issue-7771-4x
Avoid json_encode when serializing non-UTF8 literals
2022-04-27 01:44:06 -04:00
Matt Brown
20351c6667 Avoid json_encode when serializing non-UTF8 literals
`\Psalm\Internal\Clause::$hash` basically holds a hash on
arbitrary input literals, used for later comparison. Using
`json_encode` fails when dealing with non-UTF8 literals,
which has been replaced by plain PHP `serialize`.

Resolves: #7771
2022-04-27 01:42:37 -04:00
Matt Brown
d0524c2418 Forbid min bound greater than max bound in int range 2022-04-27 01:38:21 -04:00
Matt Brown
9cc2af56b4 Support Stringable before PhpToken autoloading 2022-04-27 01:36:17 -04:00
Matt Brown
0c65a19554 Allow null to ArrayAccess::offsetSet $offset param 2022-04-27 01:34:09 -04:00
Matt Brown
d58736a550 fix #7747: DateInterval::createFromDateString can be false 2022-04-27 01:32:38 -04:00
hirokinoue
3a6ebbb8ff add test case for sort() 2022-04-24 01:00:38 +09:00
hirokinoue
63faa0c919 test the correct function 2022-04-24 00:54:58 +09:00
hirokinoue
a525342bc7 add test case 2022-04-16 14:05:51 +09:00
orklah
6d0cc07255
Merge pull request #7838 from VincentLanglet/sortTypes
Fix Incompatible types found for T (Stub&ProxyQueryInterface is not in ProxyQueryInterface&Stub)
2022-04-10 10:20:30 +02:00
Jeremiasz Major
5717516f2f
Remove @psalm-generator-return annotation 2022-04-09 22:15:37 +02:00
Vincent Langlet
48bc030eec Add test 2022-04-09 21:59:23 +02:00
Jeremiasz Major
ce25b39b5d
Document @psalm-ignore-variable-* 2022-04-08 00:30:23 +02:00
Jeremiasz Major
e1fe1161bd
Remove documented annotations from wall of shame 2022-04-07 21:44:33 +02:00
Jeremiasz Major
f4f1a26cf9
Document @psalm-yield 2022-04-07 21:43:12 +02:00
orklah
b72f0564bc fix refining lowercase string and non-empty-string together 2022-04-05 21:05:23 +02:00
AndrolGenhald
0bdf9425e3 Fix namespaced min/max int range keyword issue introduced in #7775. 2022-03-30 16:08:14 -05:00
Oliver Hader
9e4e468907
Adjust test case format
Related: #7771
2022-03-16 10:35:36 +01:00
Oliver Hader
b00d9e9514
Add test case reproducing issue #7771
Related: #7771
2022-03-15 10:34:46 +01:00
orklah
32f10c392d
Merge pull request #7788 from AndrolGenhald/attribute-analysis-improvements
More attribute fixes.
2022-03-14 21:11:19 +01:00
AndrolGenhald
08d4d797ef More attribute fixes. 2022-03-14 14:15:07 -05:00
Matthew Brown
a9ccfd3da4 Fix test with sort 2022-03-14 13:02:55 -04:00
Matthew Brown
76119237cc Fix #7776
When a new clause contains tautology it can be disregarded entirely
2022-03-12 23:21:42 -05:00
Matthew Brown
ed4782e0e0 Improve performance of large formula operations 2022-03-12 22:31:12 -05:00
Semyon
9beb0a62b2 Forbid min bound greater than max bound in int range 2022-03-11 17:26:59 +03:00
Semyon
a7e98f4bfc Forbid any non literal int in int range (except min and max named objects) 2022-03-11 17:26:07 +03:00
Matthew Brown
da47f198ad Remove reference 2022-03-07 14:59:11 -05:00
Matthew Brown
d17435252a Remove unused class 2022-03-07 14:57:13 -05:00
Matthew Brown
9b69c7a089 Remove references to unused SqlStringProvider plugin 2022-03-07 14:54:35 -05:00
orklah
769e316f52
Merge pull request #7760 from mtk3d/fix/array_column_type_inference
Fix #7750: array_column type inference
2022-03-07 19:00:37 +01:00