8000 [Debug] throw deprecation when `@return void` is found · Issue #30123 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Debug] throw deprecation when @return void is found #30123
Closed
@nicolas-grekas

Description

@nicolas-grekas

The DebugClassLoader does lightweight static analysis at autoload time already and triggers deprecations when some annotations in a docblock hint it to do so.

When this class finds a method that doesn't have void as return type but whose parent has the @return void annotation, we should trigger a deprecation - unless it also has the same annotation.
The should hint ppl to add the void return type immediately in their code and be ready for next-major of the parent class, which will be able to smoothly turn the annotation to a real void declaration.

ping @fancyweb @GuilhemN since you contributed similar rules in the past.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0