Skip to content
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

Merged
merged 4 commits into from Mar 15, 2024
Merged

Conversation

greg0ire
Copy link
Member

Spotted while working on #1767

We use it in one of our classes, that we should be able to statically
analyze or test.
psalm.xml.dist Outdated
Comment on lines 41 to 52
<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>
Copy link
Member

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?

Copy link
Member

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?

Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works.

@greg0ire greg0ire merged commit 24f94ad into doctrine:2.11.x Mar 15, 2024
15 checks passed
@greg0ire greg0ire deleted the analyze-middleware branch March 15, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants