Skip to content

Commit c68fb68

Browse files
minor #51395 Psalm: Ignore UnusedClass errors (derrabus)
This PR was merged into the 5.4 branch. Discussion ---------- Psalm: Ignore UnusedClass errors | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A `UnusedClass` errors reported by Psalm are not really helpful for us. Symfony is full of classes that are meant to be used downstream. The only usages we have are inside our tests and fxitures, but we chose to exclude those. Let's ignore `UnusedClass` errors. Commits ------- 12beb97 Psalm: Ignore UnusedClass errors
2 parents ed94190 + 12beb97 commit c68fb68

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

psalm.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@
3636
<referencedClass name="UnitEnum"/>
3737
</errorLevel>
3838
</UndefinedDocblockClass>
39+
<UnusedClass>
40+
<errorLevel type="suppress">
41+
<!--
42+
Because we don't analyze our tests or fixtures, we will
43+
get a lot of false positives regarding unused classes.
44+
-->
45+
<directory name="src/Symfony" />
46+
</errorLevel>
47+
</UnusedClass>
3948
<UnusedConstructor>
4049
<errorLevel type="suppress">
4150
<!--

0 commit comments

Comments
 (0)