AndrolGenhald
bfe7f96b56
Allow suppressing UnusedPsalmSuppress, remove unused suppressions.
2021-12-11 13:23:00 -06: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
30a65685a2
Import instead of using fqn classes
2021-12-03 21:40:18 +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
Matthew Brown
175ba83332
Migrate most IssueBuffer::accepts calls to IssueBuffer::maybeAdd ( #7020 )
2021-11-29 14:54:17 -05:00
orklah
ab61eae5c9
Taint can't transmit through numerics nor bool
2021-11-25 22:51:35 +01:00
orklah
3bc06a8eab
Taint can't transmit through numerics nor bool
2021-11-25 22:40:01 +01:00
Bruce Weirdan
c556920352
Revert "Merge remote-tracking branch 'upstream/master' into test5"
...
This reverts commit 043a0262f7
, reversing
changes made to cc4c29837d
.
2021-10-16 00:20:38 +03:00
orklah
99d8f92e4f
what would that do?
2021-10-15 22:33:04 +02:00
orklah
c4ebc34695
suppress or use the return type
2021-10-11 17:27:52 +02:00
orklah
5d6d3df4cf
unnecessary identical child method
2021-09-26 23:34:32 +02:00
Matthew Brown
6d09418a23
Detect unused return values ( #5917 )
...
* Detect unused return values
* Allow static-returning instance methods (presumed to be fluent)
* Make $is_used the default for Codebase::methodExists
2021-06-10 14:18:15 -04:00
Bruce Weirdan
6abce3525a
Enforce use
sort ( #5900 )
2021-06-07 22:55:21 -04:00
Matt Brown
4f9067f5c8
Fix unused properties in Psalm’s own codebase
2021-05-21 09:15:23 -04:00
Matt Brown
f6bdeb6234
Fix switch-with-continue bug
2021-05-17 07:27:58 -05:00
Bruce Weirdan
0189420814
Inherit class-level suppressions when checking methods ( #5708 )
...
Fixes vimeo/psalm#5687
May fix vimeo/psalm#3357
2021-05-03 22:26:56 -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
Bruce Weirdan
105c6f3a1c
Remove (and prevent) unused uses ( #5704 )
...
* Updates `slevomat/coding-standard`
* Removes unused uses
* Prevents unused uses
* Fixes a number of symbol case mismatches
2021-05-03 17:22:15 -04:00
Matt Brown
0f5b117534
Migrate ClassLikeName options to object
2021-04-30 15:01:33 -04:00
Bruce Weirdan
93946d0827
Forbid rejecting named arguments when parent allows them ( #5627 )
...
Fixes vimeo/psalm#5622
2021-04-15 06:55:13 -04:00
Matt Brown
c64e879178
Only check param-out when no exception is thrown
2021-03-27 09:50:20 -04:00
AndrolGenhald
de5a031088
Improve @no-named-arguments support and variadics. ( #5455 )
...
* Improve @no-named-arguments support and variadics.
Handling of argument unpacking and variadics still needs a pretty big makeover, but this is a good start.
Fixes #5420
Improves #5453 (iterable works, array still causes issues)
* Remove unneeded imports.
2021-03-22 19:58:22 -04:00
Bruce Weirdan
ae247d09a3
Don't mark promoted properties as unused params ( #5404 )
...
If anything, they should be marked as unused properties.
Fixes vimeo/psalm#4964
2021-03-16 13:41:43 -04:00
Matt Brown
817d1cf3fe
Fix #5408 - avoid nullref when parser param cannot be found
2021-03-16 13:40:16 -04:00
Matt Brown
8834a54934
Fix #5219 - invalidate cache for changed params
2021-02-14 12:07:15 -05:00
Matt Brown
61478bb003
Use generics to allow property subclassing
...
cc @bdsl
2021-02-09 11:40:52 -05:00
Barney Laurance
509aadc08a
Remove all (but one) properity declarations that needed NonInvariantDocblockPropertyType suppressed ( #5174 )
...
The remaining property
\Psalm\Internal\Analyzer\NamespaceAnalyzer::$source seems a bit harder
to fix
2021-02-08 09:36:42 -05:00
Matt Brown
8b5e0fc754
Fix #5172 - prevent calling function with implicitly-broader type
2021-02-07 11:07:22 -05:00
Matt Brown
f2d202e2bb
Add less severe issue for docblock property type invariance cc @bdsl
...
This is less likely to break everything
2021-02-07 00:52:29 -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
Matt Brown
76269658ca
Fix #5107 - treat function-bound templated parameters the same
...
Previously they were treated differently depending on whether or not they were inside a method
2021-01-26 22:43:42 -05:00
orklah
1bbcbddfcf
pass args through event ( #4864 )
2021-01-07 09:02:05 -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
Matthew Brown
b1028adc5a
Break out large chunk to simplify function
2021-01-05 17:50:23 -05:00
orklah
1d9987e0ed
fix phpdoc ( #4905 )
2020-12-29 11:42:41 +00: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
1e0bcc1876
Fix #4803 - always derive method params the same way
2020-12-08 11:27:51 -05:00
Matt Brown
ca915e5028
Fix redundancies
2020-12-04 15:10:50 -05:00
Matt Brown
4a0e2f543e
Fix implicit void closure not getting recognised
2020-12-04 13:16:05 -05:00
Matt Brown
5f065d3d74
Turn template bound tuples into object
...
Ref #4714
2020-11-27 11:43:30 -05:00
orklah
b6a3282589
Detect redundant cast ( #4695 )
...
* detect redundant cast
* fix redundant cast issues
* fix redundant cast in tests
2020-11-25 12:04:48 -05:00
Matt Brown
95de6cf177
Allow immutable classes to be specialised through calls
2020-11-19 01:38:20 -05:00
Matt Brown
f65868c023
Fix style
2020-11-13 16:43:36 -05:00
Matt Brown
d97c8b750a
Add closure-use termination for byref flows
2020-11-13 13:37:27 -05:00
Matt Brown
2e47ca51d5
Fix #4547 - mark unused uses
2020-11-13 13:13:29 -05: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
Matt Brown
724b25b918
Change control_flow_graph to data_flow_graph
2020-10-13 17:28:12 -04:00