Skip to content

is_subclass_of tries to load a Class when given as String #1871

@fionera

Description

@fionera

Summary of a problem or a feature request

When using is_subclass_of PHPStan tries to load the Class even when its given as String to the function.

Code snippet that reproduces the problem

https://phpstan.org/r/820f5f8f-7585-46cc-8122-d4883f69bb58

With working example:
https://phpstan.org/r/c55bf0de-e348-4bf4-a92f-bd83e9674632

Expected output

Dont Crash

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions