psalm
psalm copied to clipboard
query re: IssueData & plugins in 5.x
With IssueData
being flagged as internal in the 5.x beta, is the interface for getting a hold of issues in the AfterAnalysisEvent
going to change? I'm currently getting a bunch of InternalProperty
issues being flagged since pulling in 5.x 🤔
Hey @SignpostMarv, can you reproduce the issue on https://psalm.dev ?
PR for reference: https://github.com/vimeo/psalm/pull/7268
I think the @internal was added in bulk based on the directory of the class. It doesn't seem to make sense to have an internal class sent to plugins.
So I'd personally vote to move the IssueData out of the Internal namespace and remove the @internal
@orklah I'm seeing that in psalm 5.7, some classes are flagged as non-internal, but the constructors are flagged as internal- this seems to be a good way to allow types to be consumed etc.
With IssueData
for example, because the entire class is flagged as internal then any use of the properties is also flagged with InternalProperty
instances- it seems that taking @internal
off the class and shifting it to the constructor only would allow the properties to be consumed without issue and leave only the constructor to be flagged in unit tests (which is where #9424 comes in).
So I'd personally vote to move the
IssueData
out of theInternal
namespace and remove the@internal
I'd also make it final if we do that move.