-
-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analyze Middleware directory #1768
Conversation
We use it in one of our classes, that we should be able to statically analyze or test.
psalm.xml.dist
Outdated
<InternalClass> | ||
<errorLevel type="suppress"> | ||
<!-- Random package should not call this class from the Doctrine bridge, but we are in the Doctrine bundle here --> | ||
<referencedClass name="Symfony\Bridge\Doctrine\Middleware\Debug\Driver"/> | ||
</errorLevel> | ||
</InternalClass> | ||
<InternalMethod> | ||
<errorLevel type="suppress"> | ||
<!-- Random package should not call this method from the Doctrine bridge, but we are in the Doctrine bundle here --> | ||
<referencedMethod name="Symfony\Bridge\Doctrine\Middleware\Debug\Driver::__construct"/> | ||
</errorLevel> | ||
</InternalMethod> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do these not work as @psalm-suppress
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have a lot psalm-suppres
in the code and we do have a lot suppress
in the psalm config. Is there a pattern in DoctrineBundle when to use one or the other?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pattern is that we put stuff into config that does not work with inline suppress. There are plenty of such cases when psalm-suppress doesn't have an effect but putting it to config does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do these not work as
@psalm-suppress
?
I'll try, it's just that I forgot that we were doing things like this in that repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works.
It seems to have been forgotten.
a6aa83d
to
d05c094
Compare
Spotted while working on #1767