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
asrar
e3f46d9a3c
refactor: use list<string>
2022-05-23 19:45:33 +02:00
asrar
e28831dff8
feat: fix ci + preserve existing throws
2022-05-22 18:27:38 +02:00
asrar
c6854cf567
Adds support for fixing missing throws doc block
2022-05-21 17:39:51 +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
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
2a9ea7ea71
Support Stringable before PhpToken autoloading
2022-03-07 16:08:24 -05:00
Mateusz Cholewka
483d35980a
check is value for sure is null
2022-03-07 14:07:16 +01:00
Mateusz Cholewka
d53f57b5f7
wrap row in union again
...
From: https://github.com/vimeo/psalm/pull/7760#discussion_r820264671
$result_element_type should be a Union, $row_shape is an Atomic
(a part of a Union). new Union([$row_shape]); should be ok
2022-03-06 21:28:48 +01:00
Mateusz Cholewka
56e65fd5ba
skip creating unnecessary union
2022-03-06 17:07:56 +01:00
Mateusz Cholewka
88d49b9923
provide array column type for null column
2022-03-06 15:44:56 +01:00
Abdul Malik Ikhsan
9666b90e41
Register openssl_sign function to impure functions
...
openssl_sign has $signature parameter that by reference that can re-used
2022-03-02 22:59:12 +07:00
orklah
fc2c6ab4d5
Merge pull request #7727 from AndrolGenhald/attribute-analysis-improvements
...
Attribute analysis improvements
2022-02-24 21:34:05 +01:00
orklah
26bfc95b13
allow SimpleTypeInferer to infer non empty lists
2022-02-24 20:57:29 +01:00
AndrolGenhald
c82abe3017
Fix trailing commas for PHP 7.
2022-02-23 22:30:50 -06:00
AndrolGenhald
5f9a8c9240
Fix types.
2022-02-23 22:12:32 -06:00
AndrolGenhald
43764f0c3d
Add Reflection getAttributes analysis.
2022-02-23 22:12:32 -06:00
AndrolGenhald
1387f94324
Attribute analysis improvements.
2022-02-23 22:12:32 -06:00
orklah
3a85f49268
Merge pull request #7673 from VincentLanglet/pdoException
...
PDOException extends RuntimeException and can use int code errors
2022-02-23 13:45:57 +01:00
Bei Xiao
c9666bbeb5
Reduce method complexity
2022-02-22 20:50:43 +02:00
Bei Xiao
6a3b5679fe
Support interfaces extending enums
2022-02-22 16:04:56 +02:00
Aaron Piotrowski
97b5685f55
Fix first-class callable in loop
2022-02-21 18:37:20 -06:00
orklah
1a5b120081
Merge pull request #7713 from AndrolGenhald/bugfix/self-in-attribute
...
Use current context when analyzing attributes
2022-02-21 18:50:22 +01:00
AndrolGenhald
04c0db5aff
Use current context when analyzing attributes ( fixes #7710 ).
2022-02-21 10:38:50 -06:00
m1ke
628bf584c2
Alter config file to actually load threads param
2022-02-21 11:07:21 +00:00
AndrolGenhald
0476ca7844
Fix trailing commas for PHP < 7.3.
2022-02-18 08:44:51 -06:00
AndrolGenhald
ea2f452c25
Analyze attribute statements instead of constructing virtual statements.
2022-02-18 08:18:34 -06:00
a.dmitryuk
8e1e0d1e5e
style-ci
2022-02-18 10:33:35 +07:00
a.dmitryuk
dc8764153e
Throw exception if file_put_contents failed
2022-02-18 10:05:23 +07:00
87d9a01f78
Add configuration for maximum size of shaped array
2022-02-15 14:09:08 +01:00
eb3df40fbb
Add option to disable @var parsing everywhere except for properties.
2022-02-15 10:04:56 +01:00
Vincent Langlet
694157b2e0
PDOException extends RuntimeException and can use int code errors
2022-02-14 21:04:10 +01:00
AndrolGenhald
fd0ecf2528
Rename variable to be consistent with existing convention.
2022-02-13 15:34:21 -06:00
AndrolGenhald
32c389482c
Fix issue with nested try
block and add more tests.
2022-02-13 15:30:06 -06:00
AndrolGenhald
7b1599d783
Fix false positive for unused variable in try ( fixes #7613 ).
2022-02-13 15:14:59 -06:00
Bruce Weirdan
dc776d3ada
Suppress false-positive
2022-02-13 00:48:58 +02:00
Bruce Weirdan
45a19b3f3c
Honour global function suppressions for UndefinedFunction
...
Fixes vimeo/psalm#7610
2022-02-13 00:22:55 +02:00
orklah
a3852b8a55
Merge pull request #7650 from orklah/totallytyped
...
deprecate totallyTyped
2022-02-12 09:56:39 +01:00
orklah
dbf47b16c3
deprecate totallyTyped
2022-02-12 09:30:37 +01:00