mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Merge pull request #7431 from zoonru/disable_suppress_all
This commit is contained in:
commit
3a6dc9b458
@ -114,6 +114,7 @@
|
||||
<xs:attribute name="reportInfo" type="xs:boolean" default="true" />
|
||||
<xs:attribute name="restrictReturnTypes" type="xs:boolean" default="false" />
|
||||
<xs:attribute name="limitMethodComplexity" type="xs:boolean" default="false" />
|
||||
<xs:attribute name="disableSuppressAll" type="xs:boolean" default="false" />
|
||||
<xs:attribute name="triggerErrorExits" type="TriggerErrorExitsType" default="default" />
|
||||
</xs:complexType>
|
||||
|
||||
|
@ -154,6 +154,15 @@ This flag is deprecated and will be removed in Psalm 5
|
||||
```
|
||||
When `true`, strings can be used as classes, meaning `$some_string::someMethod()` is allowed. If `false`, only class constant strings (of the form `Foo\Bar::class`) can stand in for classes, otherwise an `InvalidStringClass` issue is emitted. Defaults to `false`.
|
||||
|
||||
#### disableSuppressAll
|
||||
|
||||
```xml
|
||||
<psalm
|
||||
disableSuppressAll="[bool]"
|
||||
>
|
||||
```
|
||||
When `true`, disables wildcard suppression of all issues with `@psalm-suppress all`. Defaults to `false`.
|
||||
|
||||
#### memoizeMethodCallResults
|
||||
|
||||
```xml
|
||||
|
@ -328,6 +328,11 @@ class Config
|
||||
*/
|
||||
public $allow_string_standin_for_class = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $disable_suppress_all = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
@ -912,6 +917,7 @@ class Config
|
||||
'rememberPropertyAssignmentsAfterCall' => 'remember_property_assignments_after_call',
|
||||
'allowPhpStormGenerics' => 'allow_phpstorm_generics',
|
||||
'allowStringToStandInForClass' => 'allow_string_standin_for_class',
|
||||
'disableSuppressAll' => 'disable_suppress_all',
|
||||
'usePhpDocMethodsWithoutMagicCall' => 'use_phpdoc_method_without_magic_or_parent',
|
||||
'usePhpDocPropertiesWithoutMagicCall' => 'use_phpdoc_property_without_magic_or_parent',
|
||||
'memoizeMethodCallResults' => 'memoize_method_calls',
|
||||
|
@ -212,7 +212,9 @@ class IssueBuffer
|
||||
}
|
||||
}
|
||||
|
||||
$suppress_all_position = array_search('all', $suppressed_issues);
|
||||
$suppress_all_position = $config->disable_suppress_all
|
||||
? false
|
||||
: array_search('all', $suppressed_issues);
|
||||
|
||||
if ($suppress_all_position !== false) {
|
||||
if (is_int($suppress_all_position)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user