Skip to content

When one class mentioned by @phpstan-sealed is unknown all classes are incorrectly reputed unknown #13777

@claudepache

Description

@claudepache

Bug report

Given:

/** @phpstan-sealed A|B */
interface I { }

class A implements I { }

// but missing declaration of class B { }

I get the correct error PHPDoc tag @phpstan-sealed contains unknown class B, but I also get the spurious error PHPDoc tag @phpstan-sealed contains unknown class A.

Code snippet that reproduces the problem

https://phpstan.org/r/ae6c4944-018b-4e3d-a6bc-000a6c995a7a

Expected output

No PHPDoc tag @phpstan-sealed contains unknown class A error.

Did PHPStan help you today? Did it make you happy in any way?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions