AndrolGenhald
1387f94324
Attribute analysis improvements.
2022-02-23 22:12:32 -06:00
AndrolGenhald
ea2f452c25
Analyze attribute statements instead of constructing virtual statements.
2022-02-18 08:18:34 -06:00
b30121ba1c
Deprecate template_extended_count
2022-01-26 20:21:00 +01:00
Vincent
7b25ca75f4
Resolve generics of inherited pseudo methods ( fix #7419 )
2022-01-19 11:45:19 +01:00
Bruce Weirdan
08413d71bb
Restore attributes in ClassConstantStorage
...
This partially fixes BC break introduced in vimeo/psalm#7129
2021-12-26 02:24:01 +02:00
Philip Hofstetter
d45cb64827
allow marking enum cases as @deprecated
2021-12-22 06:16:42 +01:00
rarila
97e6511fab
Set number of lines before and after namespace.
2021-12-15 04:58:32 +01:00
rarila
1c298c4605
Conversion of Psalm\Type
2021-12-14 02:31:22 +01:00
ralila
e32af3c05a
Conversion of Psalm\Type\Atomic
2021-12-14 02:26:28 +01:00
AndrolGenhald
23b781163a
Use getSingleAtomic() instead of array_values(getAtomicTypes())[0].
2021-12-11 13:44:34 -06:00
Matthew Brown
4229045c23
Remove array properties that are never read
2021-12-11 11:55:37 -05:00
adrew
dee3fc4358
try to fix generic assertions for list and array
2021-12-06 02:25:40 +03:00
rarila
39402c233d
Return type hints ( #7065 )
...
Co-authored-by: ralila <>
2021-12-05 19:51:26 +02:00
ralila
f833085a15
Fix fqn usage in php-doc
2021-12-04 03:37:19 +01:00
ralila
2a956498bf
Import instead of using fqn functions
2021-12-03 21:07:25 +01:00
ralila
245920e53c
Import instead of using fqn
2021-12-03 20:11:20 +01:00
orklah
8b07e69645
Merge pull request #6514 from zoonru/if-this-is
...
Add if-this-is
2021-10-04 09:49:26 +02:00
orklah
53c0a4e63a
cleanup
2021-10-04 00:03:06 +02:00
orklah
38dac34846
unnecessary null initialization
2021-09-26 23:34:32 +02:00
orklah
fce60a018a
param defaults
2021-09-26 22:37:16 +02:00
7e0b489efe
Merge remote-tracking branch 'origin/master' into if-this-is
2021-09-21 12:12:15 +02:00
Bruce Weirdan
b4f024b1fe
Basic enum checks
...
* Duplicate cases
* Duplicate case values
* Invalid case values: value on a pure enum case, missing value on a
backed enum case, backing type / case type mismatch
* Literal expression evaluation for case values
Fixes vimeo/psalm#6426
Fixes vimeo/psalm#6427
2021-09-07 12:35:38 +03:00
Matthew Brown
acc7ee261c
Fix #6066 - introduce more robust system for capturing template constraints ( #6072 )
...
* Fix #6066 - add better system for capturing template constraints
* Fix comment
2021-07-11 12:03:21 -04:00
Matthew Brown
d883d73991
Fix template bound terminology
...
I had this flipped by mistake
2021-07-10 14:08:09 -04:00
Claas Augner
9a78b2fbc8
Mark FunctionLikeStorage::setParams()/addParam() as internal
2021-07-09 00:58:29 +02:00
Claas Augner
b91e00b03f
Always keep FunctionLikeStorage->param_lookup in sync
2021-07-06 11:58:58 +02:00
Claas Augner
601a981898
Extract FunctionLikeStorage::setParams()/addParam()
2021-07-06 11:52:42 +02:00
Matt Brown
b678461f5c
Improve detection of fluent methods
2021-06-12 17:09:42 -04:00
Bruce Weirdan
6abce3525a
Enforce use
sort ( #5900 )
2021-06-07 22:55:21 -04:00
Matt Brown
6a61298074
Fix #5810 - detect properties that are never read
2021-05-21 09:25:57 -04:00
Matt Brown
4f9067f5c8
Fix unused properties in Psalm’s own codebase
2021-05-21 09:15:23 -04:00
Matthew Brown
832a190dd4
Support enums ( #5699 )
...
* Add initial enum preparation
* Support cases method
* Ignore bad use error
cc @weirdan
* Fix type
2021-05-03 17:54:09 -04:00
Matt Brown
012dafad79
Fix #5383 - prevent unsound use of new static for generics
2021-04-10 13:16:19 -04:00
AndrolGenhald
870c433dc2
Check oldest ancestor for protected method visibility ( fixes #5595 ) ( #5597 )
2021-04-07 22:01:41 -04:00
Matt Brown
15b0542260
Prevent more offset issues
2021-03-22 23:26:03 -04:00
Joe Hoyle
e59670ef68
Add documentation to LSP ( #5267 )
...
* Add documention to LSP
Add descriptions for all Classes, Functions, Methods, Class Constants for LSP methods for Hover, SignatureInformation and Completions
* Descriptions for class name completions
* PHPCS
* Fix docblock being overriden
* Remove trailing comma in args
* Add description to function param before early `continue`
* Update php-language-server-protocol to 1.5
* Break up long array docblocks
* Break up docblock onto newline
Co-authored-by: Matthew Brown <github@muglug.com>
2021-02-24 10:14:04 -05:00
Matt Brown
3106635953
Fix inference of conditional types when wildcard constant given
2021-02-20 12:21:52 -05:00
Barney Laurance
0cd5442c47
Enforce property type invariance ( #5131 )
...
* Implement NonInvariantChildProperty detection
See https://github.com/vimeo/psalm/issues/4184
* Delete test cases with 'parentSetsWiderTypeInConstructor'
As I understand it these are not valid test cases. They
emit NonInvariantPropertyType issues which seems correct - the property
type variation is I think a latent bug in the sample code.
* Reduce shortcode for NonInvariantPropertyType to 1+max used shortcode on master
2021-01-31 11:32:24 -05:00
orklah
09fb141e49
Document lowercase-string when possible ( #4904 )
...
* document lowercase-string
* fix missing strtolower
2020-12-29 11:42:12 +00:00
Matt Brown
e6dad6e65f
Be smarter when choosing inherited param types
...
Ref #4803
2020-12-10 00:15:37 -05:00
Matt Brown
524084a64c
Tighten up rules arouund when mutation-free methods get memoised
2020-12-08 16:39:06 -05:00
Matt Brown
fb88145780
Fix #4767 - rescan directly-affected class-interface relationships
2020-12-04 01:19:51 -05:00
Matt Brown
db8a3ab846
Fix #4751 - allow MethodSignatureMismatch to be overridable when info comes from docblock
2020-12-02 15:13:28 -05:00
Matt Brown
eeb9cb0b07
Add some documentation for template_types
2020-11-29 19:22:54 -05:00
Matt Brown
15a5bd5e29
Simplify storage and retrieval of extended template params
2020-11-29 15:05:32 -05:00
Matt Brown
6db8132b4c
Simplify call analysers a bit
...
Ref #4714
2020-11-27 16:31:10 -05:00
Matt Brown
5f065d3d74
Turn template bound tuples into object
...
Ref #4714
2020-11-27 11:43:30 -05:00
Matt Brown
8325317e16
Fix #4674 - is_readable should be impure
2020-11-23 08:54:11 -05:00
Matt Brown
10c0bcc4e2
Fix #4674 - is_readable should be impure
2020-11-23 08:45:27 -05:00
Matt Brown
af008953a8
Fix #4661 - support conditional escaping for functions
2020-11-22 13:24:33 -05:00