psalm icon indicating copy to clipboard operation
psalm copied to clipboard

Support treating any non-internal (non-test) class as part of the public API

Open stof opened this issue 2 months ago • 1 comments

Many packages don't use @api at all. Instead, anything that is not tagged as @internal is considered part of the public API (this of course excludes test code which is not shipped as part of the public package).

It would be great to have a configuration setting to change how Psalm defines the public API, to make it usable in such packages. My current approach is that I have to identify issue handlers that I need to suppress because the rules rely on the definition of the public API, which is fragile and also suppresses those errors for internal classes.

stof avatar Oct 26 '25 18:10 stof

Hey @stof, can you reproduce the issue on https://psalm.dev? These will be used as phpunit tests when implementing the feature or fixing this bug.

psalm-github-bot[bot] avatar Oct 26 '25 18:10 psalm-github-bot[bot]