Skip to content
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.

Trying to import a class expands it to its FQCN instead #379

Open
JapSeyz opened this issue Apr 12, 2018 · 1 comment
Open

Trying to import a class expands it to its FQCN instead #379

JapSeyz opened this issue Apr 12, 2018 · 1 comment

Comments

@JapSeyz
Copy link

JapSeyz commented Apr 12, 2018

I recently decided to try out Crane over Intelliphense, and the main difference I have noticed is that when I am trying to typehint a variable in a method declaration, it will expand the suggested class to it's FQCN instead of importing it.

EG:

public function onCharged(PaymentC $event)
{
}

Suggests the PaymentChargedEvent class as the typehint, but when I click it, the following happens:

public function onCharged(\App\Events\PaymentGateway\PaymentChargedEvent $event)
{
}

It expands the suggestion to the FQCN, instead of adding a use statement.

I have verified that the Class wasn't already added as a use statement. Is this a setting I can turn off, to set Crane to import the class instead of expanding it?

@nevadascout
Copy link
Member

Unfortunately there isn't setting for this, but I have a task for Crane to automatically add a use statement when trying to use a class that's not imported.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants