Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Enforce return type hints for Symfony 4+ #24882

Closed
@tomasfejfar

Description

@tomasfejfar
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Symfony version 4+

In #24722 there is a massive change that turns docblocks into type hints. I think it would be a good idea to make an automated test in coding standard for it.

It would make it simpler to make sure that all new features and refactorings use return type hints.

Also as more and more code gets converted to type hints it will be harder and harder to find the places where type hints are missing.

Even if it were too hard to do it all at once, it would be possible to keep in branch, rebase and use it every now and then in newly created PR adding more type hints.

What do you think? Is it feasible? I wouldn't mind making a PR for the CS check, if it makes sense.

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