Skip to content

Importing global PHP functions #4527

@szymach

Description

@szymach

Description

Hello!

Right now only functions from other namespaces can be imported (and count for some reason) with the use function directive. All other display the cannot be resolved in the Fix imports in Current Namespace window.

Use case/motivation

I have found the use function to be far more elegant than the prefixed syntax, but I have to do it manually. Being able to import them automatically like the class names would save a lot of tedious minor work.

Related issues

No response

Are you willing to submit a pull request?

No

Code of Conduct

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    PHP[ci] enable extra PHP tests (php/php.editor)kind:featureA feature requestneeds:triageRequires attention from one of the committers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions