AndrolGenhald
285740a753
Merge branch '4.x'
2022-07-07 15:01:38 -05:00
AndrolGenhald
e751a27eaf
Fix crash when redefining method with fewer params ( fixes #8141 ).
2022-06-26 06:27:46 -05: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
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
AndrolGenhald
08d4d797ef
More attribute fixes.
2022-03-14 14:15:07 -05:00
orklah
2f3c150690
merge fixes
2022-02-26 21:28:15 +01:00
orklah
0fe6eaf5d9
Merge remote-tracking branch 'upstream/4.x' into upstream-master13
2022-02-26 21:26:59 +01: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
AndrolGenhald
103ec628b0
Improve tests.
2022-02-21 10:44:59 -06:00
AndrolGenhald
04c0db5aff
Use current context when analyzing attributes ( fixes #7710 ).
2022-02-21 10:38:50 -06:00
Bruce Weirdan
997bded2e3
Merge branch '4.x' into upstream-master
2022-02-21 01:08:21 +02:00
AndrolGenhald
ea2f452c25
Analyze attribute statements instead of constructing virtual statements.
2022-02-18 08:18:34 -06:00
8d0c1c62e8
Ensure all template parameters are specified in classes, interfaces, traits
2022-01-31 10:06:31 +01:00
Matthew Brown
b49682a485
Simplify issue suppression in tests
2022-01-13 14:38:17 -05:00
Matthew Brown
f439d6550b
Ensure that all entries in test arrays have explicit keys ( #7386 )
...
* Transformation that updates assertions
* Simplify transformation
* Ensure that all tests have keys
* Fix a few remaining keys
2022-01-13 13:49:37 -05:00
orklah
639b1b94a3
fix stub and fix test
2021-12-20 09:57:06 +01:00
orklah
ba6a4d8af5
fix test
2021-12-17 00:16:50 +01:00
orklah
9583d6a7e7
invert stub, add test
2021-12-17 00:12:54 +01:00
rarila
97e6511fab
Set number of lines before and after namespace.
2021-12-15 04:58:32 +01:00
ralila
8fb2e0f885
Handle some partials
2021-12-04 21:55:53 +01:00
orklah
b7e70f3cd7
load the ReturnTypeWillChange stubs for all versions to allow using it on every PHP version
2021-11-09 19:57:03 +01:00
Bruce Weirdan
e4ead74879
Use fully-qualified name for virtual class strings
...
Fixes vimeo/psalm#6211
2021-08-01 02:22:16 +03:00
orklah
6fc55d7bff
add test
2021-07-29 20:41:08 +02:00
AndrolGenhald
d4590711d6
Fix object-like array keys when combining string and automatic keys ( fixes #5427 ). ( #5428 )
...
* Fix object-like array keys (fixes #5427 ).
* Fix incorrect return types for tests.
* Fix false positive list with literal int key.
2021-03-19 21:44:44 -04:00
Bruce Weirdan
7007000a68
Allow Attribute::IS_REPEATABLE ( #4971 )
...
This allows Attribute::IS_REPEATABLE to be specified as attribute flag.
Fixes vimeo/psalm#4892 , vimeo/psalm#4970
2021-01-10 21:55:06 -05:00
orklah
f9fccb2b2d
implement DTO for plugins ( #4881 )
...
* implement DTO for plugins
* introduce EventHandler + reintroduce legacy API for plugins
2021-01-06 09:05:53 -05:00
Matt Brown
8a76a43d8c
Fix #4798 - improve conversion from type back to PhpParser node
2020-12-07 14:39:58 -05:00
Matt Brown
60b3086b9a
Fix #4609 - add more attribute rules
2020-11-22 01:15:52 -05:00
Matt Brown
66d574b82e
Fix #4475 - verify that used attributes actual use the Attribute attribute
2020-11-22 00:52:56 -05:00
Matt Brown
11825a2cc2
Fix #4611 - flag invalid attribute arguments correctly
2020-11-22 00:44:44 -05:00
Matt Brown
938cebc9f8
Use better inference for getAttributes return type
...
Fixes #4367
2020-10-30 17:37:16 -04:00
Matt Brown
579327a470
Detect when targets are incorrectly targeted
2020-10-30 13:28:45 -04:00
Matt Brown
f8eee22f77
Add basic support for PHP attributes
...
Ref #4367 - supports creation and argument checks
2020-10-24 00:10:22 -04:00