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

8172 Commits

Author SHA1 Message Date
orklah
02d5beecb0
Merge pull request #8051 from AndrolGenhald/bugfix/8048
Fix possibly empty array shape appearing non-empty (fixes #8048).
2022-06-08 19:22:12 +02:00
AndrolGenhald
af5c191e7b Fix generic object comparison to use template constraint as default (fixes #8068). 2022-06-07 19:12:36 -05:00
Bruce Weirdan
4e59398f77
Coerce null to empty string in array keys
Fixes vimeo/psalm#8063

Alters the fix for vimeo/psalm#2165 (1a48be8e9c)

/cc: @iluuu1994, @muglug
2022-06-06 17:41:42 -04:00
AndrolGenhald
34322b79dd Fix suppression comment. 2022-06-06 16:19:27 -05:00
orklah
f47b4180fb
Merge pull request #8054 from kkmuffme/runtime-cache-origin-location
store origin location by ID to speed up psalm by up to 75%
2022-06-04 18:47:14 +02:00
kkmuffme
cb78f54d8a Performance: cut the selected_text from snippet
instead of from full text

50% faster than cutting from full text, improves performance up to 3% depending on file length and number of errors in file
2022-06-04 15:53:02 +02:00
kkmuffme
8b20708063 stores origin location by ID to speed up psalm by up to 75% in certain cases 2022-06-04 14:26:27 +02:00
AndrolGenhald
c271b1245e Fix possibly empty array shape appearing non-empty (fixes #8048). 2022-06-02 14:00:52 -05:00
AndrolGenhald
2f090e5722 Fix TypeCombiner::combine to not modify TIntRange arguments.
This keeps coming up in obscure places, hopefully this fixes it once and for all. I would reeeaaally love to have an immutable type system at some point...
2022-06-02 12:36:41 -05:00
AndrolGenhald
054ed300f0
Fix side effect when loading config. 2022-05-29 00:16:38 -04:00
orklah
06d8e3e399
Merge pull request #8011 from kkmuffme/performance-only-load-files-once
Performance only load files once
2022-05-26 18:03:08 +02:00
orklah
d94f56a88a
Merge pull request #8007 from kkmuffme/add-missing-igbinary-serialize-code
igbinary_serialize code was missing in file
2022-05-26 17:57:02 +02:00
kkmuffme
278e8777d9 dont strolower filename, since file names on linux are case sensitive 2022-05-25 14:12:15 +02:00
kkmuffme
06178d0a6b only load files once
* use static to keep opened files with content
* move position of file cache population to the place where we read files to ensure cache always gets populated and not on open only (since it's called directly in some places)
2022-05-25 13:53:32 +02:00
kkmuffme
5d8b5d197d micro-optimize condition
https://github.com/vimeo/psalm/pull/7997#pullrequestreview-983975049
2022-05-25 11:25:19 +02:00
kkmuffme
ed0db0f7ce igbinary_serialize code was missing in file 2022-05-25 10:52:41 +02:00
kkmuffme
acffb851f6 debug CI 2022-05-24 10:00:54 +02:00
kkmuffme
c1cef60e21 change cache hash type for better performance 2022-05-24 09:59:47 +02:00
Jerome TAMARELLE
afed93b6bd Fix conflict of option -c with shell completion 2022-05-20 09:42:57 +02:00
Kevin van Sonsbeek
22080a1b15 bugfix/#7912: Added extension_loaded check for apcu and load internal stub on true 2022-05-17 23:45:42 +02: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
Theodore Brown
6f3ceea7d0 Remove several unused use statements 2022-05-08 23:18:18 -05:00
Matt Brown
9c153de6da Fix LSP api discrepancies 2022-04-27 11:56:54 -04:00
orklah
038947eb08
Merge pull request #7887 from ging-dev/lsp-fixes
improve LSP
2022-04-26 22:23:00 +02:00
m1ke
70b44d566f Alter order of baseline option operations to allow updating custom baseline 2022-04-26 14:35:33 +01:00
ging-dev
cb10e845e0
improve LSP 2022-04-25 17:43:23 +07:00
orklah
2724c1dba9
Merge pull request #7872 from hirokinoue/float-template-arithmetics-4.x
don't emit issues when doing arithmetics on float templates
2022-04-19 19:35:57 +02:00
Vitaliy Ognev
6afdb0d9b6 better type safety and inference 2022-04-18 21:00:20 +03:00
Vitaliy Ognev
1dc2b3b026 cache statements even without persistent parser cache 2022-04-18 10:26:56 +03:00
hirokinoue
b132c3b751 fix error message 2022-04-16 14:05:40 +09:00
hirokinoue
a99532da5e code format 2022-04-16 14:05:31 +09:00
hirokinoue
23c3d87dcc don't emit issues when doing arithmetics on float templates 2022-04-16 14:05:20 +09:00
Anton Belyaev
e7c2c77ec2 Disable filepath formatting as a link for Drone CI's output 2022-04-11 23:19:55 +03: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
Thomas Landauer
587039fd1d Fixing CS 2022-04-03 11:41:39 +02:00
Vincent Langlet
590ac22ea2 Use another strategy 2022-04-03 09:16:00 +02:00
Vincent Langlet
3729c0d3ed Sort types when intersection is used 2022-04-02 22:08:44 +02:00
Thomas Landauer
e87c25c825 Second attempt of #7835 2022-04-02 14:57:56 +02:00
Michael Stilkerich
a696e559b7 Treat readline functions as impure 2022-04-01 16:13:55 +02:00
AndrolGenhald
0bdf9425e3 Fix namespaced min/max int range keyword issue introduced in #7775. 2022-03-30 16:08:14 -05:00
orklah
80f972cc38
Merge pull request #7791 from ohader/issue-7771-4x
Avoid json_encode when serializing non-UTF8 literals
2022-03-16 19:00:49 +01:00
orklah
ebffd5258a
Merge pull request #7433 from zoonru/maximum_shaped_array_size
Add configuration for maximum size of shaped array
2022-03-15 21:19:05 +01:00
Oliver Hader
2b3753676b
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-03-15 10:39:58 +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
11f51f4c54 Use key-of instead of literal int union. 2022-03-14 15:05:33 -05:00
AndrolGenhald
08d4d797ef More attribute fixes. 2022-03-14 14:15:07 -05:00
fluffycondor
7240f01154
Code style 2022-03-11 23:02:11 +00:00
fluffycondor
cb5231463c
Make error message more verbose 2022-03-11 22:58:41 +00:00
fluffycondor
6bc90fa0a9
Fix error messages 2022-03-11 22:54:30 +00:00
Semyon
9beb0a62b2 Forbid min bound greater than max bound in int range 2022-03-11 17:26:59 +03:00