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

7899 Commits

Author SHA1 Message Date
orklah
7f3d55dfa0
Merge pull request #8244 from jack-worman/CountReport
New "Count" Report Format
2022-07-11 18:55:01 +02:00
Jack Worman
3b76ac85dc Count Report Format 2022-07-10 17:50:50 -05:00
kkmuffme
a77f6fca12 use error_log 2022-07-10 12:04:42 +02:00
kkmuffme
7742d8a903 use lock to fix race condition 2022-07-10 10:03:18 +02:00
kkmuffme
90586083e6 check if file in cache already before adding
* reduces I/O by 30%
* minimal performance improvement (<0.5%)
2022-06-28 20:46:23 +02:00
kkmuffme
9082eab915 improve cache hash performance
* do not concatenate with timestamp as this is slow, since $file_contents may be big
* use file contents not file path for cache hash only to ensure it works if file_path not set but file_content is
* improves performance by ~5%
2022-06-28 20:45:03 +02:00
kkmuffme
57239a7c8e assign keys to variable for better performance
improves performance by ~1-1.5%
2022-06-28 20:40:43 +02:00
kkmuffme
4048bb9d8b only sort when necessary and faster hash
* sort is much more expensive than count, so we only sort if we have something to sort
* could implement for ksort too, but advantage there is minimal since we almost always have more than 1 possibility
* use same hash algorithm as in other places (= faster)
* reduces runtime by 2-3%
2022-06-28 20:40:43 +02:00
kkmuffme
4db928e923 split loop for better performance
* check isset for all elements first, as array_diff is much more expensive
* Improves performance by 1%
2022-06-28 20:40:43 +02:00
Tim Düsterhus
31ad16d29c
Stop using deprecated string interpolation syntax in StatementsProvider.php
This fixed the following PHP 8.2 deprecation:

> Uncaught RuntimeException: PHP Error: Using ${var} in strings is deprecated, use {$var} instead in …/vimeo/psalm/src/Psalm/Internal/Provider/StatementsProvider.php:140

see: https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation
2022-06-27 23:41:51 +02:00
orklah
06dd975cb5
Merge pull request #8174 from AndrolGenhald/fix-attribute-crash
Fix crash when redefining method with fewer params (fixes #8141).
2022-06-26 13:47:54 +02:00
AndrolGenhald
e751a27eaf Fix crash when redefining method with fewer params (fixes #8141). 2022-06-26 06:27:46 -05:00
orklah
b3038f0936
Merge pull request #8164 from AndrolGenhald/encapsed-literal-strings
Encapsed literal strings
2022-06-26 12:52:33 +02:00
orklah
a4ab664aee
Merge pull request #8165 from AndrolGenhald/stop-using-issuebuffer-add-😡
Improve @psalm-internal and prevent usage of IssueBuffer::add().
2022-06-25 10:12:10 +02:00
AndrolGenhald
b671117417 Improve @psalm-internal and prevent usage of IssueBuffer::add(). 2022-06-25 02:09:40 -05:00
AndrolGenhald
5ff54bce46 CS fix. 2022-06-24 21:03:33 -05:00
AndrolGenhald
3aea0987ef Fix non-empty encapsed string check. 2022-06-24 20:28:04 -05:00
AndrolGenhald
a804e459b6 PHP 7.1 compatibility. 2022-06-24 19:29:12 -05:00
AndrolGenhald
2559222f67 More interpolation and concatenation improvements. 2022-06-24 19:22:59 -05:00
AndrolGenhald
450409f045 Infer literal string from encapsed (interpolated) string. 2022-06-24 17:24:34 -05:00
Benjamin Morel
933714f6ad Add ReflectionProperty properties 2022-06-24 18:47:49 +02:00
orklah
c60e0a890c
Merge pull request #8056 from kkmuffme/phpdoc-false-positives-for-partially-invalid
fix false positives for partially invalid phpdoc
2022-06-15 13:21:26 +02:00
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
kkmuffme
74671e3a3c fix false positives for partially incalid phpdoc 2022-06-05 12:16:01 +02: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