kkmuffme
8ac86f0a4d
use consistent race condition dir creation code in all places in cache
2022-09-11 10:28:16 +02:00
kkmuffme
4726454f49
update leftover md5 in provider to commonly used hash
...
Revert "update leftover md5 in provider to commonly used hash"
This reverts commit 66337ecf50446dca8650a0812ebfe516d1993e06.
partially put back
Update StatementsProvider.php
2022-09-11 10:22:48 +02:00
kkmuffme
8da5f5eb1a
use exceptions instead of error_log for ParserCacheProvider
...
* use exceptions instead of error_log for ParserCacheProvider like all other cache providers do
* remove duplicate code in ParserCacheProvider
* use same hash as other cache providers
* update Config.php cache directory creation to use same code as ParserCacheProvider
2022-09-11 10:22:48 +02:00
kkmuffme
c450d95727
fix inconsistent function naming
2022-09-08 21:33:06 +02:00
kkmuffme
249d61ec1b
classlike_alias incorrect casing not handled correctly
2022-09-08 21:33:06 +02:00
orklah
76cfb911b2
Merge pull request #8469 from kkmuffme/strictify-anchored-preg-replace
...
preg_replace with anchor will always only have 1 replacement
2022-09-08 20:01:16 +02:00
kkmuffme
d0984f4e47
fix psalm internal errors reported by new checks
2022-09-08 19:35:44 +02:00
kkmuffme
15046c932b
preg_replace with anchor will always only have 1 replacement, add limit for clarity and performance
2022-09-08 18:51:33 +02:00
kkmuffme
a17fa249ac
report invalidCasing when using a class that is not user defined too (e.g. new DateTime)
2022-09-08 13:28:43 +02:00
Semyon
f0a8810cf5
Fix ctype_digit assertion bug
2022-09-07 15:49:35 +03:00
Semyon
969c7a098b
Make ctype_digit and ctype_lower work as assertions
2022-09-02 17:37:10 +03:00
Vincent Langlet
6bc714c867
Add support for callable in array_reduce
2022-08-24 16:04:22 +02:00
orklah
7ee3a81bce
Merge pull request #8370 from someniatko/issue-8363
...
Ensure we recognize inherited static methods for the first-class callables
2022-08-18 21:50:20 +02:00
orklah
7e010a7a4f
Merge pull request #8372 from kkmuffme/safely-read-write-cache-data
...
always use lock when writing/reading cache data to/from file
2022-08-11 18:06:56 +02:00
Markus Staab
8f6e16add6
added truthy-string alias for non-falsy-string
2022-08-11 16:49:58 +02:00
kkmuffme
8ca594a34d
always use lock when writing/reading cache data to/from file
2022-08-11 13:12:47 +02:00
Teemu Koskinen
fefd4861d6
Use $codebase->classlike_storage_provider only if it has the required data. Fixes #8373
2022-08-08 23:49:14 +03:00
someniatko
be02e7e5c7
#8363 - support static
as a type parameter in return types of the first-class callables
2022-08-04 17:16:06 +03:00
someniatko
f3d67845c5
#8363 - ensure we recognize inherited static methods for the first-class callables
2022-08-04 17:01:42 +03:00
kkmuffme
0d32203f9a
add ", but" for InvalidArgument error message where a type is provided
2022-08-03 19:40:30 +02:00
AndrolGenhald
148264305f
Merge pull request #8341 from someniatko/issue-7731
...
recognize `@psalm-allow-private-mutation` in PHP 8+ constructors
2022-07-29 09:31:20 -05:00
someniatko
0abde258fa
#7731 - recognize @psalm-allow-private-mutation
in PHP 8+ constructors
2022-07-29 16:50:56 +03:00
someniatko
0c652f72f6
#8330 - take into account that static
type may have been unwrapped in ExistingAtomicStaticCallAnalyzer#hasStaticInType()
2022-07-29 12:31:37 +03:00
orklah
d7cd84c4eb
Merge pull request #8302 from kkmuffme/fix-cache-directory-race-conditions
...
fix race conditions causing notices if directory does not exist
2022-07-25 19:04:37 +02:00
Semyon
b1295d6894
Code style
2022-07-25 17:15:28 +03:00
kkmuffme
e1b0255db8
fix triggerErrorExits not working
...
Fix https://github.com/vimeo/psalm/issues/8270
2022-07-21 12:54:47 +02:00
kkmuffme
233863dc0c
circle CI error for unrelated code?
2022-07-21 11:36:55 +02:00
kkmuffme
bb760a2224
fix race conditions causing notices if directory does not exist
2022-07-21 11:36:16 +02:00
AndrolGenhald
cac9ec957c
Merge pull request #8249 from someniatko/issue-8200
...
Improve inferring the "final" `static` type when calling static methods inside a different class
2022-07-14 16:41:01 -05:00
orklah
416b597d1c
Merge pull request #7994 from aszenz/4.x
...
Adds support for fixing missing throws doc block
2022-07-12 20:46:14 +02:00
someniatko
931b3bb18b
#8200 - simplify ExistingAtomicStaticCallAnalyzer::hasStaticType()
2022-07-12 21:43:31 +03:00
someniatko
b3e673d7ec
#8200 - flip logic of determining "source" of static
type in ExistingAtomicStaticCallAnalyzer::getMethodReturnType()
2022-07-12 21:17:10 +03:00
someniatko
3a5054018b
#8200 - generalize ExistingAtomicStaticCallAnalyzer::hasStaticInType() for non-object cases
2022-07-12 21:00:19 +03:00
someniatko
470885e4f1
#8200 - improve inferring the "final" static
type when calling static methods inside a different class
...
differentiate between `static` defined in a class which CALLS a given static method, and `static` defined in the method which IS CALLED.
2022-07-12 13:51:28 +03:00
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