Skip to content

Completely disallow Fully Qualified Class Name (FQCN) references everywhere? #6966

Closed Answered by Wirone
arderyp asked this question in Q&A
Discussion options

You must be logged in to vote

First of all, you asked about PHP CS Fixer's GlobalNamespaceImportFixer, but you mention Rector and provide ECS configuration 🤷‍♂️. But anyway...

  1. GlobalNamespaceImportFixer, as its name speaks explicitly, handles only symbols from global namespace, so it won't fix any FQCN from custom namespace.
  2. There is fully_qualified_strict_types fixer, which on the other hand handles FQCNs, but only for symbols already imported, and not all cases are covered.
  3. There are several issues related to FQCNs to improve current support.

PS. Rector has configuration option to import FQCNs.

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
2 replies
@IgorDePaula
Comment options

@arderyp
Comment options

Comment options

You must be logged in to vote
6 replies
@Wirone
Comment options

@arderyp
Comment options

@Wirone
Comment options

@arderyp
Comment options

@Wirone
Comment options

Answer selected by arderyp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #6782 on May 15, 2023 21:33.