Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to force usage of FQN #1031

Merged
merged 1 commit into from
Sep 1, 2020
Merged

Add option to force usage of FQN #1031

merged 1 commit into from
Sep 1, 2020

Conversation

edvordo
Copy link
Contributor

@edvordo edvordo commented Aug 31, 2020

Closes #1007

Copy link
Collaborator

@mfn mfn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the var name, LGTM!

@@ -1067,8 +1067,9 @@ protected function getClassNameInDestinationFile(object $model, string $classNam
$className = trim($className, '\\');
$writingToExternalFile = !$this->write;
$classIsNotInExternalFile = $reflection->getName() !== $className;
$forceFQCN = $this->laravel['config']->get('ide-helper.force_fqn', false);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to stay consistent regarding the abbreviation:

Suggested change
$forceFQCN = $this->laravel['config']->get('ide-helper.force_fqn', false);
$forceFQN = $this->laravel['config']->get('ide-helper.force_fqn', false);

@barryvdh barryvdh merged commit a96add6 into barryvdh:master Sep 1, 2020
@UksusoFF
Copy link
Contributor

UksusoFF commented Sep 7, 2020

@mfn seems getUsedClassNames method also need check for force_fqn?

@mfn
Copy link
Collaborator

mfn commented Sep 7, 2020

@UksusoFF 🤷‍♀️ I don't use that option. Can you create a PR with tests?

@UksusoFF
Copy link
Contributor

UksusoFF commented Sep 7, 2020

Seems it's some unexpected behavior with my code. Will check it.

@mfn
Copy link
Collaborator

mfn commented Sep 7, 2020

Okay, thanks for checking 👍 Please keep us updated!

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

Successfully merging this pull request may close these issues.

Disable "Simplify full namespaces"
4 participants