Skip to content

Coding standards: Importing PHP built-in classes #9426

Closed
@umulmrum

Description

@umulmrum

Concerning the coding standards (https://symfony.com/doc/current/contributing/code/standards.html).

The example shows that built-in PHP classes are not imported but preceded with a backslash on every use, but the rules do not mention this in any way unless I didn't miss it. PSR-1 and PSR-2 also seem to not handle this.

So my question is, what is the rule on imports? Always import classes but never import built-in classes?

Thanks for a clarification. I can submit a PR if required and requested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    hasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions