Skip to content

Feature Request: Add a code action to create a use import for a function call #693

@still-dreaming-1

Description

@still-dreaming-1

This would be very similar to the code action "use ClassName". For example, it could be offered for code like this: \gzencode($data, 9);
The action would add use function gzencode; below the use imports for classes. The line where the function call is made would be changed to not have a "\" character. This is a convention I have noticed in several modern php projects where they prefer to have a use import instead of a fully qualified name for function calls, including for calling built-in php functions.

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions