Skip to content

Commit

Permalink
deprecate forbidEcho
Browse files Browse the repository at this point in the history
  • Loading branch information
orklah committed Jan 14, 2022
1 parent 3a09784 commit 8ee62cf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion config.xsd
Expand Up @@ -67,7 +67,13 @@
<xs:attribute name="findUnusedCode" type="xs:boolean" default="false" />
<xs:attribute name="findUnusedVariablesAndParams" type="xs:boolean" default="false" />
<xs:attribute name="findUnusedPsalmSuppress" type="xs:boolean" default="false" />
<xs:attribute name="forbidEcho" type="xs:boolean" default="false" />
<xs:attribute name="forbidEcho" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation xml:lang="en">
Deprecated. Will be replaced by adding echo to forbiddenFunctions in Psalm 5.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="hideExternalErrors" type="xs:boolean" default="false" />
<xs:attribute name="hoistConstants" type="xs:boolean" default="false" />
<xs:attribute name="ignoreInternalFunctionFalseReturn" type="xs:boolean" default="true" />
Expand Down
2 changes: 1 addition & 1 deletion docs/running_psalm/issues/ForbiddenEcho.md
@@ -1,7 +1,7 @@
# ForbiddenEcho

Emitted when Psalm encounters an echo statement and the `forbidEcho` flag in your config is set to `true`

This issue is deprecated and will be removed in Psalm 5. Adding echo to forbiddenFunctions in config will result in ForbiddenCode issue instead
```php
<?php

Expand Down
1 change: 1 addition & 0 deletions src/Psalm/Config.php
Expand Up @@ -792,6 +792,7 @@ private static function processConfigDeprecations(
$deprecated_attributes = [
'allowCoercionFromStringToClassConst',
'allowPhpStormGenerics',
'forbidEcho'
];

$deprecated_elements = [
Expand Down

0 comments on commit 8ee62cf

Please sign in to comment.