Skip to content

[ErrorHandler] DebugClassLoader reports bad static method should be implemented #35836

Closed
@alekitto

Description

@alekitto

Symfony version(s) affected: 5.0.4

Description
If a @method annotation with static return type is present on an interface, the DebugClassLoader reports Class Foo should implement method static FooInterface::method().

As per phpDocumentor method tag if a method is static the return type is mandatory. This implies that

 * @method static getInstance()

should be parsed as non-static method with static return type, but now is parsed as static untyped method.

Possible Solution
The @method parse regex on DebugClassLoader.php:L430 should capture return type and check it while determining if a method should be static or not.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions