Repository: ergebnis/php-cs-fixer-config (php)

Issue:
`global_namespace_import ` disabled but `PhpCsFixerCustomFixers/no_import_from_global_namespace` enabled
Hi  there,

Do you know why

[`global_namespace_import`](https://cs.symfony.com/doc/rules/import/global_namespace_import.html) is disabled but [`PhpCsFixerCustomFixers/no_import_from_global_namespace`](https://github.com/kubawerlos/php-cs-fixer-custom-fixers#noimportfromglobalnamespacefixer) is enabled?

Can't the core `global_namespace_import` be configured to do the same thing with `['import_classes' => false, 'import_constants' => false, 'import_functions' => false]`

Thanks

Pull request:
Enhancement: Enable and configure `global_namespace_import` instead of `PhpCsFixerCustomFixers/no_import_from_global_namespace` fixer
This pull request

- [x] enables and configure `global_namespace_import` instead of `PhpCsFixerCustomFixers/no_import_from_global_namespace` fixer

Fixes #1008.

💁‍♂️ For reference, see

- https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.20.0?tab=readme-ov-file#noimportfromglobalnamespacefixer
- https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.49.0/doc/rules/import/global_namespace_import.rst

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 38d044a..6631a62 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ For a full diff see [`6.21.0...main`][6.21.0...main].
 
 - Updated `kubawerlos/php-cs-fixer-custom-fixers` ([#1009]), by [@dependabot]
 - Disabled the `fully_qualified_strict_types` fixer ([#1010]), by [@localheinz]
+- Enabled and configured the `global_namespace_import` instead of the `PhpCsFixerCustomFixers/no_import_from_global_namespace` fixer ([#1011]), by [@localheinz]
 
 ## [`6.21.0`][6.21.0]
 
diff --git a/src/RuleSet/Php53.php b/src/RuleSet/Php53.php
index 76372dd..a4c3804 100644
--- a/src/RuleSet/Php53.php
+++ b/src/RuleSet/Php53.php
@@ -36,7 +36,6 @@ final class Php53
                 new Fixer\MultilineCommentOpeningClosingAloneFixer(),
                 new Fixer\NoDuplicatedArrayKeyFixer(),
                 new Fixer\NoDuplicatedImportsFixer(),
-                new Fixer\NoImportFromGlobalNamespaceFixer(),
                 new Fixer\PhpdocArrayStyleFixer(),
                 new Fixer\PhpdocTypesCommaSpacesFixer(),
                 new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -54,7 +53,6 @@ final class Php53
                     'ignore_expressions' => true,
                 ],
                 'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-                'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
                 'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
                 'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
                 'align_multiline_comment' => [
@@ -246,7 +244,11 @@ final class Php53
                     ],
                 ],
                 'get_class_to_class_keyword' => false,
-                'global_namespace_import' => false,
+                'global_namespace_import' => [
+                    'import_classes' => false,
+                    'import_constants' => false,
+                    'import_functions' => false,
+                ],
                 'group_import' => false,
                 'header_comment' => false,
                 'heredoc_closing_marker' => false,
diff --git a/src/RuleSet/Php54.php b/src/RuleSet/Php54.php
index 31c3ae7..b6c8c64 100644
--- a/src/RuleSet/Php54.php
+++ b/src/RuleSet/Php54.php
@@ -36,7 +36,6 @@ final class Php54
                 new Fixer\MultilineCommentOpeningClosingAloneFixer(),
                 new Fixer\NoDuplicatedArrayKeyFixer(),
                 new Fixer\NoDuplicatedImportsFixer(),
-                new Fixer\NoImportFromGlobalNamespaceFixer(),
                 new Fixer\PhpdocArrayStyleFixer(),
                 new Fixer\PhpdocTypesCommaSpacesFixer(),
                 new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -54,7 +53,6 @@ final class Php54
                     'ignore_expressions' => true,
                 ],
                 'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-                'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
                 'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
                 'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
                 'align_multiline_comment' => [
@@ -247,7 +245,11 @@ final class Php54
                     ],
                 ],
                 'get_class_to_class_keyword' => false,
-                'global_namespace_import' => false,
+                'global_namespace_import' => [
+                    'import_classes' => false,
+                    'import_constants' => false,
+                    'import_functions' => false,
+                ],
                 'group_import' => false,
                 'header_comment' => false,
                 'heredoc_closing_marker' => false,
diff --git a/src/RuleSet/Php55.php b/src/RuleSet/Php55.php
index 77c8404..95b0b0f 100644
--- a/src/RuleSet/Php55.php
+++ b/src/RuleSet/Php55.php
@@ -36,7 +36,6 @@ final class Php55
                 new Fixer\MultilineCommentOpeningClosingAloneFixer(),
                 new Fixer\NoDuplicatedArrayKeyFixer(),
                 new Fixer\NoDuplicatedImportsFixer(),
-                new Fixer\NoImportFromGlobalNamespaceFixer(),
                 new Fixer\PhpdocArrayStyleFixer(),
                 new Fixer\PhpdocTypesCommaSpacesFixer(),
                 new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -54,7 +53,6 @@ final class Php55
                     'ignore_expressions' => true,
                 ],
                 'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-                'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
                 'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
                 'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
                 'align_multiline_comment' => [
@@ -251,7 +249,11 @@ final class Php55
                     ],
                 ],
                 'get_class_to_class_keyword' => false,
-                'global_namespace_import' => false,
+                'global_namespace_import' => [
+                    'import_classes' => false,
+                    'import_constants' => false,
+                    'import_functions' => false,
+                ],
                 'group_import' => false,
                 'header_comment' => false,
                 'heredoc_closing_marker' => false,
diff --git a/src/RuleSet/Php56.php b/src/RuleSet/Php56.php
index dc3cbab..d6d5d24 100644
--- a/src/RuleSet/Php56.php
+++ b/src/RuleSet/Php56.php
@@ -36,7 +36,6 @@ final class Php56
                 new Fixer\MultilineCommentOpeningClosingAloneFixer(),
                 new Fixer\NoDuplicatedArrayKeyFixer(),
                 new Fixer\NoDuplicatedImportsFixer(),
-                new Fixer\NoImportFromGlobalNamespaceFixer(),
                 new Fixer\PhpdocArrayStyleFixer(),
                 new Fixer\PhpdocTypesCommaSpacesFixer(),
                 new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -54,7 +53,6 @@ final class Php56
                     'ignore_expressions' => true,
                 ],
                 'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-                'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
                 'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
                 'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
                 'align_multiline_comment' => [
@@ -251,7 +249,11 @@ final class Php56
                     ],
                 ],
                 'get_class_to_class_keyword' => false,
-                'global_namespace_import' => false,
+                'global_namespace_import' => [
+                    'import_classes' => false,
+                    'import_constants' => false,
+                    'import_functions' => false,
+                ],
                 'group_import' => false,
                 'header_comment' => false,
                 'heredoc_closing_marker' => false,
diff --git a/src/RuleSet/Php70.php b/src/RuleSet/Php70.php
index 49ac98e..2599c1d 100644
--- a/src/RuleSet/Php70.php
+++ b/src/RuleSet/Php70.php
@@ -36,7 +36,6 @@ final class Php70
                 new Fixer\MultilineCommentOpeningClosingAloneFixer(),
                 new Fixer\NoDuplicatedArrayKeyFixer(),
                 new Fixer\NoDuplicatedImportsFixer(),
-                new Fixer\NoImportFromGlobalNamespaceFixer(),
                 new Fixer\PhpdocArrayStyleFixer(),
                 new Fixer\PhpdocTypesCommaSpacesFixer(),
                 new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -54,7 +53,6 @@ final class Php70
                     'ignore_expressions' => true,
                 ],
                 'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-                'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
                 'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
                 'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
                 'align_multiline_comment' => [
@@ -251,7 +249,11 @@ final class Php70
                     ],
                 ],
                 'get_class_to_class_keyword' => false,
-                'global_namespace_import' => false,
+                'global_namespace_import' => [
+                    'import_classes' => false,
+                    'import_constants' => false,
+                    'import_functions' => false,
+                ],
                 'group_import' => false,
                 'header_comment' => false,
                 'heredoc_closing_marker' => false,
diff --git a/src/RuleSet/Php71.php b/src/RuleSet/Php71.php
index ba56482..e1ac92f 100644
--- a/src/RuleSet/Php71.php
+++ b/src/RuleSet/Php71.php
@@ -36,7 +36,6 @@ final class Php71
                 new Fixer\MultilineCommentOpeningClosingAloneFixer(),
                 new Fixer\NoDuplicatedArrayKeyFixer(),
                 new Fixer\NoDuplicatedImportsFixer(),
-                new Fixer\NoImportFromGlobalNamespaceFixer(),
                 new Fixer\PhpdocArrayStyleFixer(),
                 new Fixer\PhpdocTypesCommaSpacesFixer(),
                 new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -54,7 +53,6 @@ final class Php71
                     'ignore_expressions' => true,
                 ],
                 'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-                'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
                 'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
                 'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
                 'align_multiline_comment' => [
@@ -251,7 +249,11 @@ final class Php71
                     ],
                 ],
                 'get_class_to_class_keyword' => false,
-                'global_namespace_import' => false,
+                'global_namespace_import' => [
+                    'import_classes' => false,
+                    'import_constants' => false,
+                    'import_functions' => false,
+                ],
                 'group_import' => false,
                 'header_comment' => false,
                 'heredoc_closing_marker' => false,
diff --git a/src/RuleSet/Php72.php b/src/RuleSet/Php72.php
index adc3e74..1895925 100644
--- a/src/RuleSet/Php72.php
+++ b/src/RuleSet/Php72.php
@@ -36,7 +36,6 @@ final class Php72
                 new Fixer\MultilineCommentOpeningClosingAloneFixer(),
                 new Fixer\NoDuplicatedArrayKeyFixer(),
                 new Fixer\NoDuplicatedImportsFixer(),
-                new Fixer\NoImportFromGlobalNamespaceFixer(),
                 new Fixer\PhpdocArrayStyleFixer(),
                 new Fixer\PhpdocTypesCommaSpacesFixer(),
                 new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -54,7 +53,6 @@ final class Php72
                     'ignore_expressions' => true,
                 ],
                 'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-                'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
                 'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
                 'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
                 'align_multiline_comment' => [
@@ -251,7 +249,11 @@ final class Php72
                     ],
                 ],
                 'get_class_to_class_keyword' => false,
-                'global_namespace_import' => false,
+                'global_namespace_import' => [
+                    'import_classes' => false,
+                    'import_constants' => false,
+                    'import_functions' => false,
+                ],
                 'group_import' => false,
                 'header_comment' => false,
                 'heredoc_closing_marker' => false,
diff --git a/src/RuleSet/Php73.php b/src/RuleSet/Php73.php
index ecb8047..89fe334 100644
--- a/src/RuleSet/Php73.php
+++ b/src/RuleSet/Php73.php
@@ -36,7 +36,6 @@ final class Php73
                 new Fixer\MultilineCommentOpeningClosingAloneFixer(),
                 new Fixer\NoDuplicatedArrayKeyFixer(),
                 new Fixer\NoDuplicatedImportsFixer(),
-                new Fixer\NoImportFromGlobalNamespaceFixer(),
                 new Fixer\PhpdocArrayStyleFixer(),
                 new Fixer\PhpdocTypesCommaSpacesFixer(),
                 new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -54,7 +53,6 @@ final class Php73
                     'ignore_expressions' => true,
                 ],
                 'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-                'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
                 'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
                 'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
                 'align_multiline_comment' => [
@@ -251,7 +249,11 @@ final class Php73
                     ],
                 ],
                 'get_class_to_class_keyword' => false,
-                'global_namespace_import' => false,
+                'global_namespace_import' => [
+                    'import_classes' => false,
+                    'import_constants' => false,
+                    'import_functions' => false,
+                ],
                 'group_import' => false,
                 'header_comment' => false,
                 'heredoc_closing_marker' => false,
diff --git a/src/RuleSet/Php74.php b/src/RuleSet/Php74.php
index b1247f1..a3bbd50 100644
--- a/src/RuleSet/Php74.php
+++ b/src/RuleSet/Php74.php
@@ -36,7 +36,6 @@ final class Php74
                 new Fixer\MultilineCommentOpeningClosingAloneFixer(),
                 new Fixer\NoDuplicatedArrayKeyFixer(),
                 new Fixer\NoDuplicatedImportsFixer(),
-                new Fixer\NoImportFromGlobalNamespaceFixer(),
                 new Fixer\PhpdocArrayStyleFixer(),
                 new Fixer\PhpdocTypesCommaSpacesFixer(),
                 new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -54,7 +53,6 @@ final class Php74
                     'ignore_expressions' => true,
                 ],
                 'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-                'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
                 'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
                 'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
                 'align_multiline_comment' => [
@@ -251,7 +249,11 @@ final class Php74
                     ],
                 ],
                 'get_class_to_class_keyword' => false,
-                'global_namespace_import' => false,
+                'global_namespace_import' => [
+                    'import_classes' => false,
+                    'import_constants' => false,
+                    'import_functions' => false,
+                ],
                 'group_import' => false,
                 'header_comment' => false,
                 'heredoc_closing_marker' => false,
diff --git a/src/RuleSet/Php80.php b/src/RuleSet/Php80.php
index 8ba374f..d5b077b 100644
--- a/src/RuleSet/Php80.php
+++ b/src/RuleSet/Php80.php
@@ -37,7 +37,6 @@ final class Php80
                 new Fixer\MultilinePromotedPropertiesFixer(),
                 new Fixer\NoDuplicatedArrayKeyFixer(),
                 new Fixer\NoDuplicatedImportsFixer(),
-                new Fixer\NoImportFromGlobalNamespaceFixer(),
                 new Fixer\PhpdocArrayStyleFixer(),
                 new Fixer\PhpdocTypesCommaSpacesFixer(),
                 new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -59,7 +58,6 @@ final class Php80
                     'ignore_expressions' => true,
                 ],
                 'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-                'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
                 'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
                 'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
                 'align_multiline_comment' => [
@@ -258,7 +256,11 @@ final class Php80
                     ],
                 ],
                 'get_class_to_class_keyword' => true,
-                'global_namespace_import' => false,
+                'global_namespace_import' => [
+                    'import_classes' => false,
+                    'import_constants' => false,
+                    'import_functions' => false,
+                ],
                 'group_import' => false,
                 'header_comment' => false,
                 'heredoc_closing_marker' => false,
diff --git a/src/RuleSet/Php81.php b/src/RuleSet/Php81.php
index a1e165c..ea938ac 100644
--- a/src/RuleSet/Php81.php
+++ b/src/RuleSet/Php81.php
@@ -37,7 +37,6 @@ final class Php81
                 new Fixer\MultilinePromotedPropertiesFixer(),
                 new Fixer\NoDuplicatedArrayKeyFixer(),
                 new Fixer\NoDuplicatedImportsFixer(),
-                new Fixer\NoImportFromGlobalNamespaceFixer(),
                 new Fixer\PhpdocArrayStyleFixer(),
                 new Fixer\PhpdocTypesCommaSpacesFixer(),
                 new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -59,7 +58,6 @@ final class Php81
                     'ignore_expressions' => true,
                 ],
                 'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-                'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
                 'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
                 'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
                 'align_multiline_comment' => [
@@ -259,7 +257,11 @@ final class Php81
                     ],
                 ],
                 'get_class_to_class_keyword' => true,
-                'global_namespace_import' => false,
+                'global_namespace_import' => [
+                    'import_classes' => false,
+                    'import_constants' => false,
+                    'import_functions' => false,
+                ],
                 'group_import' => false,
                 'header_comment' => false,
                 'heredoc_closing_marker' => false,
diff --git a/src/RuleSet/Php82.php b/src/RuleSet/Php82.php
index bf07b50..7659a90 100644
--- a/src/RuleSet/Php82.php
+++ b/src/RuleSet/Php82.php
@@ -37,7 +37,6 @@ final class Php82
                 new Fixer\MultilinePromotedPropertiesFixer(),
                 new Fixer\NoDuplicatedArrayKeyFixer(),
                 new Fixer\NoDuplicatedImportsFixer(),
-                new Fixer\NoImportFromGlobalNamespaceFixer(),
                 new Fixer\PhpdocArrayStyleFixer(),
                 new Fixer\PhpdocTypesCommaSpacesFixer(),
                 new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -59,7 +58,6 @@ final class Php82
                     'ignore_expressions' => true,
                 ],
                 'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-                'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
                 'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
                 'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
                 'align_multiline_comment' => [
@@ -259,7 +257,11 @@ final class Php82
                     ],
                 ],
                 'get_class_to_class_keyword' => true,
-                'global_namespace_import' => false,
+                'global_namespace_import' => [
+                    'import_classes' => false,
+                    'import_constants' => false,
+                    'import_functions' => false,
+                ],
                 'group_import' => false,
                 'header_comment' => false,
                 'heredoc_closing_marker' => false,
diff --git a/src/RuleSet/Php83.php b/src/RuleSet/Php83.php
index b493dad..0daa1e6 100644
--- a/src/RuleSet/Php83.php
+++ b/src/RuleSet/Php83.php
@@ -37,7 +37,6 @@ final class Php83
                 new Fixer\MultilinePromotedPropertiesFixer(),
                 new Fixer\NoDuplicatedArrayKeyFixer(),
                 new Fixer\NoDuplicatedImportsFixer(),
-                new Fixer\NoImportFromGlobalNamespaceFixer(),
                 new Fixer\PhpdocArrayStyleFixer(),
                 new Fixer\PhpdocTypesCommaSpacesFixer(),
                 new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -59,7 +58,6 @@ final class Php83
                     'ignore_expressions' => true,
                 ],
                 'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-                'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
                 'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
                 'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
                 'align_multiline_comment' => [
@@ -259,7 +257,11 @@ final class Php83
                     ],
                 ],
                 'get_class_to_class_keyword' => true,
-                'global_namespace_import' => false,
+                'global_namespace_import' => [
+                    'import_classes' => false,
+                    'import_constants' => false,
+                    'import_functions' => false,
+                ],
                 'group_import' => false,
                 'header_comment' => false,
                 'heredoc_closing_marker' => false,


Test patch:
diff --git a/test/Unit/RuleSet/Php53Test.php b/test/Unit/RuleSet/Php53Test.php
index 015fbe7..477dcd7 100644
--- a/test/Unit/RuleSet/Php53Test.php
+++ b/test/Unit/RuleSet/Php53Test.php
@@ -47,7 +47,6 @@ final class Php53Test extends ExplicitRuleSetTestCase
             new Fixer\MultilineCommentOpeningClosingAloneFixer(),
             new Fixer\NoDuplicatedArrayKeyFixer(),
             new Fixer\NoDuplicatedImportsFixer(),
-            new Fixer\NoImportFromGlobalNamespaceFixer(),
             new Fixer\PhpdocArrayStyleFixer(),
             new Fixer\PhpdocTypesCommaSpacesFixer(),
             new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -77,7 +76,6 @@ final class Php53Test extends ExplicitRuleSetTestCase
                 'ignore_expressions' => true,
             ],
             'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-            'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
             'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
             'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
             'align_multiline_comment' => [
@@ -269,7 +267,11 @@ final class Php53Test extends ExplicitRuleSetTestCase
                 ],
             ],
             'get_class_to_class_keyword' => false,
-            'global_namespace_import' => false,
+            'global_namespace_import' => [
+                'import_classes' => false,
+                'import_constants' => false,
+                'import_functions' => false,
+            ],
             'group_import' => false,
             'header_comment' => false,
             'heredoc_closing_marker' => false,
diff --git a/test/Unit/RuleSet/Php54Test.php b/test/Unit/RuleSet/Php54Test.php
index a3bac55..0881c3f 100644
--- a/test/Unit/RuleSet/Php54Test.php
+++ b/test/Unit/RuleSet/Php54Test.php
@@ -47,7 +47,6 @@ final class Php54Test extends ExplicitRuleSetTestCase
             new Fixer\MultilineCommentOpeningClosingAloneFixer(),
             new Fixer\NoDuplicatedArrayKeyFixer(),
             new Fixer\NoDuplicatedImportsFixer(),
-            new Fixer\NoImportFromGlobalNamespaceFixer(),
             new Fixer\PhpdocArrayStyleFixer(),
             new Fixer\PhpdocTypesCommaSpacesFixer(),
             new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -77,7 +76,6 @@ final class Php54Test extends ExplicitRuleSetTestCase
                 'ignore_expressions' => true,
             ],
             'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-            'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
             'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
             'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
             'align_multiline_comment' => [
@@ -270,7 +268,11 @@ final class Php54Test extends ExplicitRuleSetTestCase
                 ],
             ],
             'get_class_to_class_keyword' => false,
-            'global_namespace_import' => false,
+            'global_namespace_import' => [
+                'import_classes' => false,
+                'import_constants' => false,
+                'import_functions' => false,
+            ],
             'group_import' => false,
             'header_comment' => false,
             'heredoc_closing_marker' => false,
diff --git a/test/Unit/RuleSet/Php55Test.php b/test/Unit/RuleSet/Php55Test.php
index 2286d04..a728a3e 100644
--- a/test/Unit/RuleSet/Php55Test.php
+++ b/test/Unit/RuleSet/Php55Test.php
@@ -42,7 +42,6 @@ final class Php55Test extends ExplicitRuleSetTestCase
             new Fixer\MultilineCommentOpeningClosingAloneFixer(),
             new Fixer\NoDuplicatedArrayKeyFixer(),
             new Fixer\NoDuplicatedImportsFixer(),
-            new Fixer\NoImportFromGlobalNamespaceFixer(),
             new Fixer\PhpdocArrayStyleFixer(),
             new Fixer\PhpdocTypesCommaSpacesFixer(),
             new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -77,7 +76,6 @@ final class Php55Test extends ExplicitRuleSetTestCase
                 'ignore_expressions' => true,
             ],
             'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-            'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
             'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
             'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
             'align_multiline_comment' => [
@@ -274,7 +272,11 @@ final class Php55Test extends ExplicitRuleSetTestCase
                 ],
             ],
             'get_class_to_class_keyword' => false,
-            'global_namespace_import' => false,
+            'global_namespace_import' => [
+                'import_classes' => false,
+                'import_constants' => false,
+                'import_functions' => false,
+            ],
             'group_import' => false,
             'header_comment' => false,
             'heredoc_closing_marker' => false,
diff --git a/test/Unit/RuleSet/Php56Test.php b/test/Unit/RuleSet/Php56Test.php
index 5f01f1c..64e51c8 100644
--- a/test/Unit/RuleSet/Php56Test.php
+++ b/test/Unit/RuleSet/Php56Test.php
@@ -47,7 +47,6 @@ final class Php56Test extends ExplicitRuleSetTestCase
             new Fixer\MultilineCommentOpeningClosingAloneFixer(),
             new Fixer\NoDuplicatedArrayKeyFixer(),
             new Fixer\NoDuplicatedImportsFixer(),
-            new Fixer\NoImportFromGlobalNamespaceFixer(),
             new Fixer\PhpdocArrayStyleFixer(),
             new Fixer\PhpdocTypesCommaSpacesFixer(),
             new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -77,7 +76,6 @@ final class Php56Test extends ExplicitRuleSetTestCase
                 'ignore_expressions' => true,
             ],
             'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-            'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
             'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
             'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
             'align_multiline_comment' => [
@@ -274,7 +272,11 @@ final class Php56Test extends ExplicitRuleSetTestCase
                 ],
             ],
             'get_class_to_class_keyword' => false,
-            'global_namespace_import' => false,
+            'global_namespace_import' => [
+                'import_classes' => false,
+                'import_constants' => false,
+                'import_functions' => false,
+            ],
             'group_import' => false,
             'header_comment' => false,
             'heredoc_closing_marker' => false,
diff --git a/test/Unit/RuleSet/Php70Test.php b/test/Unit/RuleSet/Php70Test.php
index 1029275..c5231f0 100644
--- a/test/Unit/RuleSet/Php70Test.php
+++ b/test/Unit/RuleSet/Php70Test.php
@@ -47,7 +47,6 @@ final class Php70Test extends ExplicitRuleSetTestCase
             new Fixer\MultilineCommentOpeningClosingAloneFixer(),
             new Fixer\NoDuplicatedArrayKeyFixer(),
             new Fixer\NoDuplicatedImportsFixer(),
-            new Fixer\NoImportFromGlobalNamespaceFixer(),
             new Fixer\PhpdocArrayStyleFixer(),
             new Fixer\PhpdocTypesCommaSpacesFixer(),
             new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -77,7 +76,6 @@ final class Php70Test extends ExplicitRuleSetTestCase
                 'ignore_expressions' => true,
             ],
             'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-            'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
             'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
             'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
             'align_multiline_comment' => [
@@ -274,7 +272,11 @@ final class Php70Test extends ExplicitRuleSetTestCase
                 ],
             ],
             'get_class_to_class_keyword' => false,
-            'global_namespace_import' => false,
+            'global_namespace_import' => [
+                'import_classes' => false,
+                'import_constants' => false,
+                'import_functions' => false,
+            ],
             'group_import' => false,
             'header_comment' => false,
             'heredoc_closing_marker' => false,
diff --git a/test/Unit/RuleSet/Php71Test.php b/test/Unit/RuleSet/Php71Test.php
index 5cc47ef..7a96085 100644
--- a/test/Unit/RuleSet/Php71Test.php
+++ b/test/Unit/RuleSet/Php71Test.php
@@ -47,7 +47,6 @@ final class Php71Test extends ExplicitRuleSetTestCase
             new Fixer\MultilineCommentOpeningClosingAloneFixer(),
             new Fixer\NoDuplicatedArrayKeyFixer(),
             new Fixer\NoDuplicatedImportsFixer(),
-            new Fixer\NoImportFromGlobalNamespaceFixer(),
             new Fixer\PhpdocArrayStyleFixer(),
             new Fixer\PhpdocTypesCommaSpacesFixer(),
             new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -77,7 +76,6 @@ final class Php71Test extends ExplicitRuleSetTestCase
                 'ignore_expressions' => true,
             ],
             'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-            'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
             'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
             'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
             'align_multiline_comment' => [
@@ -274,7 +272,11 @@ final class Php71Test extends ExplicitRuleSetTestCase
                 ],
             ],
             'get_class_to_class_keyword' => false,
-            'global_namespace_import' => false,
+            'global_namespace_import' => [
+                'import_classes' => false,
+                'import_constants' => false,
+                'import_functions' => false,
+            ],
             'group_import' => false,
             'header_comment' => false,
             'heredoc_closing_marker' => false,
diff --git a/test/Unit/RuleSet/Php72Test.php b/test/Unit/RuleSet/Php72Test.php
index 60c7d9d..d2d7ffe 100644
--- a/test/Unit/RuleSet/Php72Test.php
+++ b/test/Unit/RuleSet/Php72Test.php
@@ -47,7 +47,6 @@ final class Php72Test extends ExplicitRuleSetTestCase
             new Fixer\MultilineCommentOpeningClosingAloneFixer(),
             new Fixer\NoDuplicatedArrayKeyFixer(),
             new Fixer\NoDuplicatedImportsFixer(),
-            new Fixer\NoImportFromGlobalNamespaceFixer(),
             new Fixer\PhpdocArrayStyleFixer(),
             new Fixer\PhpdocTypesCommaSpacesFixer(),
             new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -77,7 +76,6 @@ final class Php72Test extends ExplicitRuleSetTestCase
                 'ignore_expressions' => true,
             ],
             'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-            'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
             'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
             'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
             'align_multiline_comment' => [
@@ -274,7 +272,11 @@ final class Php72Test extends ExplicitRuleSetTestCase
                 ],
             ],
             'get_class_to_class_keyword' => false,
-            'global_namespace_import' => false,
+            'global_namespace_import' => [
+                'import_classes' => false,
+                'import_constants' => false,
+                'import_functions' => false,
+            ],
             'group_import' => false,
             'header_comment' => false,
             'heredoc_closing_marker' => false,
diff --git a/test/Unit/RuleSet/Php73Test.php b/test/Unit/RuleSet/Php73Test.php
index d7cd06d..b115909 100644
--- a/test/Unit/RuleSet/Php73Test.php
+++ b/test/Unit/RuleSet/Php73Test.php
@@ -47,7 +47,6 @@ final class Php73Test extends ExplicitRuleSetTestCase
             new Fixer\MultilineCommentOpeningClosingAloneFixer(),
             new Fixer\NoDuplicatedArrayKeyFixer(),
             new Fixer\NoDuplicatedImportsFixer(),
-            new Fixer\NoImportFromGlobalNamespaceFixer(),
             new Fixer\PhpdocArrayStyleFixer(),
             new Fixer\PhpdocTypesCommaSpacesFixer(),
             new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -77,7 +76,6 @@ final class Php73Test extends ExplicitRuleSetTestCase
                 'ignore_expressions' => true,
             ],
             'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-            'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
             'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
             'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
             'align_multiline_comment' => [
@@ -274,7 +272,11 @@ final class Php73Test extends ExplicitRuleSetTestCase
                 ],
             ],
             'get_class_to_class_keyword' => false,
-            'global_namespace_import' => false,
+            'global_namespace_import' => [
+                'import_classes' => false,
+                'import_constants' => false,
+                'import_functions' => false,
+            ],
             'group_import' => false,
             'header_comment' => false,
             'heredoc_closing_marker' => false,
diff --git a/test/Unit/RuleSet/Php74Test.php b/test/Unit/RuleSet/Php74Test.php
index fc4da4c..b2adba3 100644
--- a/test/Unit/RuleSet/Php74Test.php
+++ b/test/Unit/RuleSet/Php74Test.php
@@ -47,7 +47,6 @@ final class Php74Test extends ExplicitRuleSetTestCase
             new Fixer\MultilineCommentOpeningClosingAloneFixer(),
             new Fixer\NoDuplicatedArrayKeyFixer(),
             new Fixer\NoDuplicatedImportsFixer(),
-            new Fixer\NoImportFromGlobalNamespaceFixer(),
             new Fixer\PhpdocArrayStyleFixer(),
             new Fixer\PhpdocTypesCommaSpacesFixer(),
             new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -77,7 +76,6 @@ final class Php74Test extends ExplicitRuleSetTestCase
                 'ignore_expressions' => true,
             ],
             'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-            'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
             'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
             'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
             'align_multiline_comment' => [
@@ -274,7 +272,11 @@ final class Php74Test extends ExplicitRuleSetTestCase
                 ],
             ],
             'get_class_to_class_keyword' => false,
-            'global_namespace_import' => false,
+            'global_namespace_import' => [
+                'import_classes' => false,
+                'import_constants' => false,
+                'import_functions' => false,
+            ],
             'group_import' => false,
             'header_comment' => false,
             'heredoc_closing_marker' => false,
diff --git a/test/Unit/RuleSet/Php80Test.php b/test/Unit/RuleSet/Php80Test.php
index 82c292d..d24180c 100644
--- a/test/Unit/RuleSet/Php80Test.php
+++ b/test/Unit/RuleSet/Php80Test.php
@@ -48,7 +48,6 @@ final class Php80Test extends ExplicitRuleSetTestCase
             new Fixer\MultilinePromotedPropertiesFixer(),
             new Fixer\NoDuplicatedArrayKeyFixer(),
             new Fixer\NoDuplicatedImportsFixer(),
-            new Fixer\NoImportFromGlobalNamespaceFixer(),
             new Fixer\PhpdocArrayStyleFixer(),
             new Fixer\PhpdocTypesCommaSpacesFixer(),
             new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -82,7 +81,6 @@ final class Php80Test extends ExplicitRuleSetTestCase
                 'ignore_expressions' => true,
             ],
             'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-            'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
             'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
             'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
             'align_multiline_comment' => [
@@ -281,7 +279,11 @@ final class Php80Test extends ExplicitRuleSetTestCase
                 ],
             ],
             'get_class_to_class_keyword' => true,
-            'global_namespace_import' => false,
+            'global_namespace_import' => [
+                'import_classes' => false,
+                'import_constants' => false,
+                'import_functions' => false,
+            ],
             'group_import' => false,
             'header_comment' => false,
             'heredoc_closing_marker' => false,
diff --git a/test/Unit/RuleSet/Php81Test.php b/test/Unit/RuleSet/Php81Test.php
index be2e654..0b016df 100644
--- a/test/Unit/RuleSet/Php81Test.php
+++ b/test/Unit/RuleSet/Php81Test.php
@@ -48,7 +48,6 @@ final class Php81Test extends ExplicitRuleSetTestCase
             new Fixer\MultilinePromotedPropertiesFixer(),
             new Fixer\NoDuplicatedArrayKeyFixer(),
             new Fixer\NoDuplicatedImportsFixer(),
-            new Fixer\NoImportFromGlobalNamespaceFixer(),
             new Fixer\PhpdocArrayStyleFixer(),
             new Fixer\PhpdocTypesCommaSpacesFixer(),
             new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -82,7 +81,6 @@ final class Php81Test extends ExplicitRuleSetTestCase
                 'ignore_expressions' => true,
             ],
             'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-            'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
             'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
             'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
             'align_multiline_comment' => [
@@ -282,7 +280,11 @@ final class Php81Test extends ExplicitRuleSetTestCase
                 ],
             ],
             'get_class_to_class_keyword' => true,
-            'global_namespace_import' => false,
+            'global_namespace_import' => [
+                'import_classes' => false,
+                'import_constants' => false,
+                'import_functions' => false,
+            ],
             'group_import' => false,
             'header_comment' => false,
             'heredoc_closing_marker' => false,
diff --git a/test/Unit/RuleSet/Php82Test.php b/test/Unit/RuleSet/Php82Test.php
index fc4b577..1d0f9f2 100644
--- a/test/Unit/RuleSet/Php82Test.php
+++ b/test/Unit/RuleSet/Php82Test.php
@@ -48,7 +48,6 @@ final class Php82Test extends ExplicitRuleSetTestCase
             new Fixer\MultilinePromotedPropertiesFixer(),
             new Fixer\NoDuplicatedArrayKeyFixer(),
             new Fixer\NoDuplicatedImportsFixer(),
-            new Fixer\NoImportFromGlobalNamespaceFixer(),
             new Fixer\PhpdocArrayStyleFixer(),
             new Fixer\PhpdocTypesCommaSpacesFixer(),
             new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -82,7 +81,6 @@ final class Php82Test extends ExplicitRuleSetTestCase
                 'ignore_expressions' => true,
             ],
             'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-            'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
             'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
             'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
             'align_multiline_comment' => [
@@ -282,7 +280,11 @@ final class Php82Test extends ExplicitRuleSetTestCase
                 ],
             ],
             'get_class_to_class_keyword' => true,
-            'global_namespace_import' => false,
+            'global_namespace_import' => [
+                'import_classes' => false,
+                'import_constants' => false,
+                'import_functions' => false,
+            ],
             'group_import' => false,
             'header_comment' => false,
             'heredoc_closing_marker' => false,
diff --git a/test/Unit/RuleSet/Php83Test.php b/test/Unit/RuleSet/Php83Test.php
index 2f9ba2a..691a0f1 100644
--- a/test/Unit/RuleSet/Php83Test.php
+++ b/test/Unit/RuleSet/Php83Test.php
@@ -48,7 +48,6 @@ final class Php83Test extends ExplicitRuleSetTestCase
             new Fixer\MultilinePromotedPropertiesFixer(),
             new Fixer\NoDuplicatedArrayKeyFixer(),
             new Fixer\NoDuplicatedImportsFixer(),
-            new Fixer\NoImportFromGlobalNamespaceFixer(),
             new Fixer\PhpdocArrayStyleFixer(),
             new Fixer\PhpdocTypesCommaSpacesFixer(),
             new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
@@ -82,7 +81,6 @@ final class Php83Test extends ExplicitRuleSetTestCase
                 'ignore_expressions' => true,
             ],
             'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
-            'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
             'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
             'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
             'align_multiline_comment' => [
@@ -282,7 +280,11 @@ final class Php83Test extends ExplicitRuleSetTestCase
                 ],
             ],
             'get_class_to_class_keyword' => true,
-            'global_namespace_import' => false,
+            'global_namespace_import' => [
+                'import_classes' => false,
+                'import_constants' => false,
+                'import_functions' => false,
+            ],
             'group_import' => false,
             'header_comment' => false,
             'heredoc_closing_marker' => false,