From c52edb3e073741bae12d3f4fc731edb672a9111a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Sun, 30 Mar 2025 14:23:23 -0300 Subject: [PATCH] Move indexes classes to the Indexes namespace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MaurĂ­cio Meneghini Fauth --- phpstan-baseline.neon | 92 +++++++++---------- psalm-baseline.xml | 6 +- .../Database/DataDictionaryController.php | 2 +- .../Operations/TableController.php | 2 +- .../Table/IndexRenameController.php | 2 +- src/Controllers/Table/IndexesController.php | 2 +- src/Controllers/Table/RelationController.php | 2 +- .../Table/Structure/SaveController.php | 2 +- src/Controllers/Table/StructureController.php | 2 +- src/CreateAddField.php | 1 + src/Database/Designer/Common.php | 2 +- src/Dbal/DatabaseInterface.php | 2 +- src/Display/Results.php | 4 +- src/{ => Indexes}/Index.php | 3 +- src/{ => Indexes}/IndexColumn.php | 2 +- src/Normalization.php | 1 + src/Plugins/Schema/TableStats.php | 2 +- src/Sql.php | 1 + src/Table/Indexes.php | 2 +- src/Table/Maintenance.php | 2 +- src/Table/Table.php | 2 +- .../Table/IndexRenameControllerTest.php | 2 +- .../Table/IndexesControllerTest.php | 2 +- .../Table/StructureControllerTest.php | 2 +- tests/unit/DatabaseInterfaceTest.php | 2 +- tests/unit/{ => Indexes}/IndexColumnTest.php | 4 +- tests/unit/{ => Indexes}/IndexTest.php | 5 +- tests/unit/Table/IndexesTest.php | 2 +- 28 files changed, 80 insertions(+), 75 deletions(-) rename src/{ => Indexes}/Index.php (99%) rename src/{ => Indexes}/IndexColumn.php (99%) rename tests/unit/{ => Indexes}/IndexColumnTest.php (97%) rename tests/unit/{ => Indexes}/IndexTest.php (97%) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index a9fdcff3ec..2514ddebf5 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -3934,7 +3934,7 @@ parameters: path: src/Controllers/Table/RelationController.php - - message: '#^Parameter \#2 \$table of static method PhpMyAdmin\\Index\:\:getPrimary\(\) expects string, mixed given\.$#' + message: '#^Parameter \#2 \$table of static method PhpMyAdmin\\Indexes\\Index\:\:getPrimary\(\) expects string, mixed given\.$#' identifier: argument.type count: 1 path: src/Controllers/Table/RelationController.php @@ -3958,7 +3958,7 @@ parameters: path: src/Controllers/Table/RelationController.php - - message: '#^Parameter \#3 \$schema of static method PhpMyAdmin\\Index\:\:getPrimary\(\) expects string, mixed given\.$#' + message: '#^Parameter \#3 \$schema of static method PhpMyAdmin\\Indexes\\Index\:\:getPrimary\(\) expects string, mixed given\.$#' identifier: argument.type count: 1 path: src/Controllers/Table/RelationController.php @@ -8569,7 +8569,7 @@ parameters: message: '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\.$#' identifier: foreach.nonIterable count: 1 - path: src/Index.php + path: src/Indexes/Index.php - message: ''' @@ -8578,139 +8578,139 @@ parameters: ''' identifier: staticMethod.deprecated count: 3 - path: src/Index.php + path: src/Indexes/Index.php - message: '#^Cannot access offset mixed on mixed\.$#' identifier: offsetAccess.nonOffsetAccessible count: 1 - path: src/Index.php + path: src/Indexes/Index.php - message: '#^Cannot cast mixed to int\.$#' identifier: cast.int count: 1 - path: src/Index.php + path: src/Indexes/Index.php - message: '#^Only booleans are allowed in &&, int\<0, 1\> given on the left side\.$#' identifier: booleanAnd.leftNotBoolean count: 1 - path: src/Index.php + path: src/Indexes/Index.php - message: '#^Only booleans are allowed in &&, int\<0, 2\> given on the left side\.$#' identifier: booleanAnd.leftNotBoolean count: 1 - path: src/Index.php + path: src/Indexes/Index.php - message: '#^Only booleans are allowed in &&, int\<0, 4\> given on the left side\.$#' identifier: booleanAnd.leftNotBoolean count: 1 - path: src/Index.php + path: src/Indexes/Index.php - message: '#^Only booleans are allowed in &&, int\<0, 8\> given on the left side\.$#' identifier: booleanAnd.leftNotBoolean count: 1 - path: src/Index.php + path: src/Indexes/Index.php - - message: '#^Parameter \#1 \$columns of method PhpMyAdmin\\Index\:\:addColumns\(\) expects array\, mixed given\.$#' + message: '#^Parameter \#1 \$columns of method PhpMyAdmin\\Indexes\\Index\:\:addColumns\(\) expects array\, mixed given\.$#' identifier: argument.type count: 1 - path: src/Index.php + path: src/Indexes/Index.php - - message: '#^Parameter \#1 \$params of method PhpMyAdmin\\Index\:\:addColumn\(\) expects array\, mixed given\.$#' + message: '#^Parameter \#1 \$params of method PhpMyAdmin\\Indexes\\Index\:\:addColumn\(\) expects array\, mixed given\.$#' identifier: argument.type count: 1 - path: src/Index.php + path: src/Indexes/Index.php - - message: '#^Property PhpMyAdmin\\Index\:\:\$choice \(string\) does not accept mixed\.$#' + message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$choice \(string\) does not accept mixed\.$#' identifier: assign.propertyType count: 1 - path: src/Index.php + path: src/Indexes/Index.php - - message: '#^Property PhpMyAdmin\\Index\:\:\$comment \(string\) does not accept mixed\.$#' + message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$comment \(string\) does not accept mixed\.$#' identifier: assign.propertyType count: 1 - path: src/Index.php + path: src/Indexes/Index.php - - message: '#^Property PhpMyAdmin\\Index\:\:\$name \(string\) does not accept mixed\.$#' + message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$name \(string\) does not accept mixed\.$#' identifier: assign.propertyType count: 1 - path: src/Index.php + path: src/Indexes/Index.php - - message: '#^Property PhpMyAdmin\\Index\:\:\$packed \(string\|null\) does not accept mixed\.$#' + message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$packed \(string\|null\) does not accept mixed\.$#' identifier: assign.propertyType count: 1 - path: src/Index.php + path: src/Indexes/Index.php - - message: '#^Property PhpMyAdmin\\Index\:\:\$parser \(string\) does not accept mixed\.$#' + message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$parser \(string\) does not accept mixed\.$#' identifier: assign.propertyType count: 1 - path: src/Index.php + path: src/Indexes/Index.php - - message: '#^Property PhpMyAdmin\\Index\:\:\$remarks \(string\) does not accept mixed\.$#' + message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$remarks \(string\) does not accept mixed\.$#' identifier: assign.propertyType count: 1 - path: src/Index.php + path: src/Indexes/Index.php - - message: '#^Property PhpMyAdmin\\Index\:\:\$schema \(string\) does not accept mixed\.$#' + message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$schema \(string\) does not accept mixed\.$#' identifier: assign.propertyType count: 1 - path: src/Index.php + path: src/Indexes/Index.php - - message: '#^Property PhpMyAdmin\\Index\:\:\$table \(string\) does not accept mixed\.$#' + message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$table \(string\) does not accept mixed\.$#' identifier: assign.propertyType count: 1 - path: src/Index.php + path: src/Indexes/Index.php - - message: '#^Property PhpMyAdmin\\Index\:\:\$type \(string\) does not accept mixed\.$#' + message: '#^Property PhpMyAdmin\\Indexes\\Index\:\:\$type \(string\) does not accept mixed\.$#' identifier: assign.propertyType count: 1 - path: src/Index.php + path: src/Indexes/Index.php - message: '#^Cannot cast mixed to int\.$#' identifier: cast.int count: 3 - path: src/IndexColumn.php + path: src/Indexes/IndexColumn.php - - message: '#^Property PhpMyAdmin\\IndexColumn\:\:\$collation \(string\|null\) does not accept mixed\.$#' + message: '#^Property PhpMyAdmin\\Indexes\\IndexColumn\:\:\$collation \(string\|null\) does not accept mixed\.$#' identifier: assign.propertyType count: 1 - path: src/IndexColumn.php + path: src/Indexes/IndexColumn.php - - message: '#^Property PhpMyAdmin\\IndexColumn\:\:\$expression \(string\|null\) does not accept mixed\.$#' + message: '#^Property PhpMyAdmin\\Indexes\\IndexColumn\:\:\$expression \(string\|null\) does not accept mixed\.$#' identifier: assign.propertyType count: 1 - path: src/IndexColumn.php + path: src/Indexes/IndexColumn.php - - message: '#^Property PhpMyAdmin\\IndexColumn\:\:\$name \(string\) does not accept mixed\.$#' + message: '#^Property PhpMyAdmin\\Indexes\\IndexColumn\:\:\$name \(string\) does not accept mixed\.$#' identifier: assign.propertyType count: 1 - path: src/IndexColumn.php + path: src/Indexes/IndexColumn.php - - message: '#^Property PhpMyAdmin\\IndexColumn\:\:\$null \(string\) does not accept mixed\.$#' + message: '#^Property PhpMyAdmin\\Indexes\\IndexColumn\:\:\$null \(string\) does not accept mixed\.$#' identifier: assign.propertyType count: 1 - path: src/IndexColumn.php + path: src/Indexes/IndexColumn.php - message: '#^Binary operation "\." between non\-falsy\-string and mixed results in an error\.$#' @@ -9547,13 +9547,13 @@ parameters: path: src/Normalization.php - - message: '#^Parameter \#2 \$table of static method PhpMyAdmin\\Index\:\:getPrimary\(\) expects string, \(int\|string\) given\.$#' + message: '#^Parameter \#2 \$table of static method PhpMyAdmin\\Indexes\\Index\:\:getPrimary\(\) expects string, \(int\|string\) given\.$#' identifier: argument.type count: 1 path: src/Normalization.php - - message: '#^Parameter \#2 \$table of static method PhpMyAdmin\\Index\:\:getPrimary\(\) expects string, mixed given\.$#' + message: '#^Parameter \#2 \$table of static method PhpMyAdmin\\Indexes\\Index\:\:getPrimary\(\) expects string, mixed given\.$#' identifier: argument.type count: 1 path: src/Normalization.php @@ -18991,13 +18991,13 @@ parameters: message: '#^Cannot access an offset on mixed\.$#' identifier: offsetAccess.nonOffsetAccessible count: 3 - path: tests/unit/IndexTest.php + path: tests/unit/Indexes/IndexTest.php - - message: '#^Parameter \#1 \$columns of method PhpMyAdmin\\Index\:\:addColumns\(\) expects array\, mixed given\.$#' + message: '#^Parameter \#1 \$columns of method PhpMyAdmin\\Indexes\\Index\:\:addColumns\(\) expects array\, mixed given\.$#' identifier: argument.type count: 2 - path: tests/unit/IndexTest.php + path: tests/unit/Indexes/IndexTest.php - message: ''' diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 8cd5414ded..2c3222111b 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -5258,7 +5258,7 @@ - + @@ -5294,7 +5294,7 @@ - + collation]]> expression]]> @@ -11546,7 +11546,7 @@ - + params['columns']]]> params['columns']]]> diff --git a/src/Controllers/Database/DataDictionaryController.php b/src/Controllers/Database/DataDictionaryController.php index f0d83e2bab..e809a9a92e 100644 --- a/src/Controllers/Database/DataDictionaryController.php +++ b/src/Controllers/Database/DataDictionaryController.php @@ -10,7 +10,7 @@ use PhpMyAdmin\Current; use PhpMyAdmin\Dbal\DatabaseInterface; use PhpMyAdmin\Http\Response; use PhpMyAdmin\Http\ServerRequest; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\ResponseRenderer; use PhpMyAdmin\Transformations; use PhpMyAdmin\Util; diff --git a/src/Controllers/Operations/TableController.php b/src/Controllers/Operations/TableController.php index 32edbd23f1..2eea88b24f 100644 --- a/src/Controllers/Operations/TableController.php +++ b/src/Controllers/Operations/TableController.php @@ -16,7 +16,7 @@ use PhpMyAdmin\Http\Response; use PhpMyAdmin\Http\ServerRequest; use PhpMyAdmin\Identifiers\DatabaseName; use PhpMyAdmin\Identifiers\TableName; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Message; use PhpMyAdmin\MessageType; use PhpMyAdmin\Operations; diff --git a/src/Controllers/Table/IndexRenameController.php b/src/Controllers/Table/IndexRenameController.php index ce025c3d3d..c50eac66e0 100644 --- a/src/Controllers/Table/IndexRenameController.php +++ b/src/Controllers/Table/IndexRenameController.php @@ -13,7 +13,7 @@ use PhpMyAdmin\Http\Response; use PhpMyAdmin\Http\ServerRequest; use PhpMyAdmin\Identifiers\DatabaseName; use PhpMyAdmin\Identifiers\TableName; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Message; use PhpMyAdmin\MessageType; use PhpMyAdmin\ResponseRenderer; diff --git a/src/Controllers/Table/IndexesController.php b/src/Controllers/Table/IndexesController.php index 395ed28c7d..2fc4223019 100644 --- a/src/Controllers/Table/IndexesController.php +++ b/src/Controllers/Table/IndexesController.php @@ -15,7 +15,7 @@ use PhpMyAdmin\Http\Response; use PhpMyAdmin\Http\ServerRequest; use PhpMyAdmin\Identifiers\DatabaseName; use PhpMyAdmin\Identifiers\TableName; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Message; use PhpMyAdmin\MessageType; use PhpMyAdmin\ResponseRenderer; diff --git a/src/Controllers/Table/RelationController.php b/src/Controllers/Table/RelationController.php index c9a8a04fba..0a1c774265 100644 --- a/src/Controllers/Table/RelationController.php +++ b/src/Controllers/Table/RelationController.php @@ -15,7 +15,7 @@ use PhpMyAdmin\Dbal\DatabaseInterface; use PhpMyAdmin\Html\Generator; use PhpMyAdmin\Http\Response; use PhpMyAdmin\Http\ServerRequest; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\MessageType; use PhpMyAdmin\ResponseRenderer; use PhpMyAdmin\Table\Table; diff --git a/src/Controllers/Table/Structure/SaveController.php b/src/Controllers/Table/Structure/SaveController.php index cca60c9660..a60f29e210 100644 --- a/src/Controllers/Table/Structure/SaveController.php +++ b/src/Controllers/Table/Structure/SaveController.php @@ -14,7 +14,7 @@ use PhpMyAdmin\Dbal\DatabaseInterface; use PhpMyAdmin\Html\Generator; use PhpMyAdmin\Http\Response; use PhpMyAdmin\Http\ServerRequest; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Message; use PhpMyAdmin\MessageType; use PhpMyAdmin\ResponseRenderer; diff --git a/src/Controllers/Table/StructureController.php b/src/Controllers/Table/StructureController.php index a980d85581..d22678fc1a 100644 --- a/src/Controllers/Table/StructureController.php +++ b/src/Controllers/Table/StructureController.php @@ -22,7 +22,7 @@ use PhpMyAdmin\Http\Response; use PhpMyAdmin\Http\ServerRequest; use PhpMyAdmin\Identifiers\DatabaseName; use PhpMyAdmin\Identifiers\TableName; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Message; use PhpMyAdmin\Partitioning\Partition; use PhpMyAdmin\Query\Utilities; diff --git a/src/CreateAddField.php b/src/CreateAddField.php index 6f27713395..f911cd96cd 100644 --- a/src/CreateAddField.php +++ b/src/CreateAddField.php @@ -7,6 +7,7 @@ namespace PhpMyAdmin; use PhpMyAdmin\Dbal\DatabaseInterface; use PhpMyAdmin\Html\Generator; use PhpMyAdmin\Identifiers\DatabaseName; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Table\Table; use function count; diff --git a/src/Database/Designer/Common.php b/src/Database/Designer/Common.php index 87bb824bee..9ad8d1c77a 100644 --- a/src/Database/Designer/Common.php +++ b/src/Database/Designer/Common.php @@ -9,7 +9,7 @@ use PhpMyAdmin\ConfigStorage\Relation; use PhpMyAdmin\Current; use PhpMyAdmin\Dbal\ConnectionType; use PhpMyAdmin\Dbal\DatabaseInterface; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Message; use PhpMyAdmin\Query\Generator as QueryGenerator; use PhpMyAdmin\Table\Table; diff --git a/src/Dbal/DatabaseInterface.php b/src/Dbal/DatabaseInterface.php index 367e6f8fcc..690491fa7e 100644 --- a/src/Dbal/DatabaseInterface.php +++ b/src/Dbal/DatabaseInterface.php @@ -13,7 +13,7 @@ use PhpMyAdmin\FieldMetadata; use PhpMyAdmin\Html\Generator; use PhpMyAdmin\I18n\LanguageManager; use PhpMyAdmin\Identifiers\DatabaseName; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\ListDatabase; use PhpMyAdmin\Query\Cache; use PhpMyAdmin\Query\Compatibility; diff --git a/src/Display/Results.php b/src/Display/Results.php index 1e450bce45..338750e0d0 100644 --- a/src/Display/Results.php +++ b/src/Display/Results.php @@ -14,8 +14,8 @@ use PhpMyAdmin\Dbal\DatabaseInterface; use PhpMyAdmin\Dbal\ResultInterface; use PhpMyAdmin\FieldMetadata; use PhpMyAdmin\Html\Generator; -use PhpMyAdmin\Index; -use PhpMyAdmin\IndexColumn; +use PhpMyAdmin\Indexes\Index; +use PhpMyAdmin\Indexes\IndexColumn; use PhpMyAdmin\Message; use PhpMyAdmin\MessageType; use PhpMyAdmin\Plugins\Transformations\Output\Text_Octetstream_Sql; diff --git a/src/Index.php b/src/Indexes/Index.php similarity index 99% rename from src/Index.php rename to src/Indexes/Index.php index a3acd21640..7443656c5b 100644 --- a/src/Index.php +++ b/src/Indexes/Index.php @@ -2,9 +2,10 @@ declare(strict_types=1); -namespace PhpMyAdmin; +namespace PhpMyAdmin\Indexes; use PhpMyAdmin\Dbal\DatabaseInterface; +use PhpMyAdmin\Message; use function __; use function array_pop; diff --git a/src/IndexColumn.php b/src/Indexes/IndexColumn.php similarity index 99% rename from src/IndexColumn.php rename to src/Indexes/IndexColumn.php index cdec660a0b..87754ed3bc 100644 --- a/src/IndexColumn.php +++ b/src/Indexes/IndexColumn.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace PhpMyAdmin; +namespace PhpMyAdmin\Indexes; use function __; diff --git a/src/Normalization.php b/src/Normalization.php index 173948e9bc..937702f756 100644 --- a/src/Normalization.php +++ b/src/Normalization.php @@ -7,6 +7,7 @@ namespace PhpMyAdmin; use PhpMyAdmin\ConfigStorage\Relation; use PhpMyAdmin\Dbal\DatabaseInterface; use PhpMyAdmin\Html\Generator; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Query\Compatibility; use function __; diff --git a/src/Plugins/Schema/TableStats.php b/src/Plugins/Schema/TableStats.php index e0cb4bf87d..1756aec1dd 100644 --- a/src/Plugins/Schema/TableStats.php +++ b/src/Plugins/Schema/TableStats.php @@ -10,7 +10,7 @@ namespace PhpMyAdmin\Plugins\Schema; use PhpMyAdmin\ConfigStorage\Relation; use PhpMyAdmin\Dbal\DatabaseInterface; use PhpMyAdmin\Font; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\ResponseRenderer; use PhpMyAdmin\Util; diff --git a/src/Sql.php b/src/Sql.php index 92943c9764..fc254a7e42 100644 --- a/src/Sql.php +++ b/src/Sql.php @@ -15,6 +15,7 @@ use PhpMyAdmin\Display\Results as DisplayResults; use PhpMyAdmin\Html\Generator; use PhpMyAdmin\Html\MySQLDocumentation; use PhpMyAdmin\Identifiers\DatabaseName; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Query\Utilities; use PhpMyAdmin\SqlParser\Components\Expression; use PhpMyAdmin\SqlParser\Statements\AlterStatement; diff --git a/src/Table/Indexes.php b/src/Table/Indexes.php index 71b23dfa62..aabf956de4 100644 --- a/src/Table/Indexes.php +++ b/src/Table/Indexes.php @@ -7,7 +7,7 @@ namespace PhpMyAdmin\Table; use PhpMyAdmin\Dbal\DatabaseInterface; use PhpMyAdmin\Identifiers\DatabaseName; use PhpMyAdmin\Identifiers\TableName; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Message; use PhpMyAdmin\Query\Compatibility; use PhpMyAdmin\Query\Generator as QueryGenerator; diff --git a/src/Table/Maintenance.php b/src/Table/Maintenance.php index 9fdd5b1337..681553267a 100644 --- a/src/Table/Maintenance.php +++ b/src/Table/Maintenance.php @@ -8,7 +8,7 @@ use PhpMyAdmin\Dbal\DatabaseInterface; use PhpMyAdmin\Dbal\Warning; use PhpMyAdmin\Identifiers\DatabaseName; use PhpMyAdmin\Identifiers\TableName; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Table\Maintenance\Message; use PhpMyAdmin\Util; diff --git a/src/Table/Table.php b/src/Table/Table.php index ae32393474..c850c5b21b 100644 --- a/src/Table/Table.php +++ b/src/Table/Table.php @@ -15,7 +15,7 @@ use PhpMyAdmin\Dbal\DatabaseInterface; use PhpMyAdmin\FieldMetadata; use PhpMyAdmin\Html\Generator; use PhpMyAdmin\Html\MySQLDocumentation; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Message; use PhpMyAdmin\Query\Compatibility; use PhpMyAdmin\Query\Generator as QueryGenerator; diff --git a/tests/unit/Controllers/Table/IndexRenameControllerTest.php b/tests/unit/Controllers/Table/IndexRenameControllerTest.php index 527263431b..75979fa77c 100644 --- a/tests/unit/Controllers/Table/IndexRenameControllerTest.php +++ b/tests/unit/Controllers/Table/IndexRenameControllerTest.php @@ -10,7 +10,7 @@ use PhpMyAdmin\Current; use PhpMyAdmin\Dbal\DatabaseInterface; use PhpMyAdmin\DbTableExists; use PhpMyAdmin\Http\Factory\ServerRequestFactory; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Table\Indexes; use PhpMyAdmin\Template; use PhpMyAdmin\Tests\AbstractTestCase; diff --git a/tests/unit/Controllers/Table/IndexesControllerTest.php b/tests/unit/Controllers/Table/IndexesControllerTest.php index 17e3ba32cd..89efdb10d8 100644 --- a/tests/unit/Controllers/Table/IndexesControllerTest.php +++ b/tests/unit/Controllers/Table/IndexesControllerTest.php @@ -11,7 +11,7 @@ use PhpMyAdmin\Dbal\DatabaseInterface; use PhpMyAdmin\DbTableExists; use PhpMyAdmin\Html\Generator; use PhpMyAdmin\Html\MySQLDocumentation; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Message; use PhpMyAdmin\Table\Indexes; use PhpMyAdmin\Table\Table; diff --git a/tests/unit/Controllers/Table/StructureControllerTest.php b/tests/unit/Controllers/Table/StructureControllerTest.php index f56159f99d..91f4797f4d 100644 --- a/tests/unit/Controllers/Table/StructureControllerTest.php +++ b/tests/unit/Controllers/Table/StructureControllerTest.php @@ -13,7 +13,7 @@ use PhpMyAdmin\Current; use PhpMyAdmin\Dbal\DatabaseInterface; use PhpMyAdmin\DbTableExists; use PhpMyAdmin\Http\Factory\ServerRequestFactory; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Template; use PhpMyAdmin\Tests\AbstractTestCase; use PhpMyAdmin\Tests\Stubs\DbiDummy; diff --git a/tests/unit/DatabaseInterfaceTest.php b/tests/unit/DatabaseInterfaceTest.php index 57ac144f6a..c76c7f9bdd 100644 --- a/tests/unit/DatabaseInterfaceTest.php +++ b/tests/unit/DatabaseInterfaceTest.php @@ -13,7 +13,7 @@ use PhpMyAdmin\Dbal\DatabaseInterface; use PhpMyAdmin\Dbal\DbiExtension; use PhpMyAdmin\Dbal\ResultInterface; use PhpMyAdmin\I18n\LanguageManager; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Query\Utilities; use PhpMyAdmin\SqlParser\Context; use PhpMyAdmin\Utils\SessionCache; diff --git a/tests/unit/IndexColumnTest.php b/tests/unit/Indexes/IndexColumnTest.php similarity index 97% rename from tests/unit/IndexColumnTest.php rename to tests/unit/Indexes/IndexColumnTest.php index 24ae9f8f53..79d776bbff 100644 --- a/tests/unit/IndexColumnTest.php +++ b/tests/unit/Indexes/IndexColumnTest.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace PhpMyAdmin\Tests; +namespace PhpMyAdmin\Tests\Indexes; -use PhpMyAdmin\IndexColumn; +use PhpMyAdmin\Indexes\IndexColumn; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; diff --git a/tests/unit/IndexTest.php b/tests/unit/Indexes/IndexTest.php similarity index 97% rename from tests/unit/IndexTest.php rename to tests/unit/Indexes/IndexTest.php index 9ee60df571..e197ec3fb7 100644 --- a/tests/unit/IndexTest.php +++ b/tests/unit/Indexes/IndexTest.php @@ -2,9 +2,10 @@ declare(strict_types=1); -namespace PhpMyAdmin\Tests; +namespace PhpMyAdmin\Tests\Indexes; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; +use PhpMyAdmin\Tests\AbstractTestCase; use PHPUnit\Framework\Attributes\CoversClass; #[CoversClass(Index::class)] diff --git a/tests/unit/Table/IndexesTest.php b/tests/unit/Table/IndexesTest.php index 35362c5f29..8de0baf554 100644 --- a/tests/unit/Table/IndexesTest.php +++ b/tests/unit/Table/IndexesTest.php @@ -6,7 +6,7 @@ namespace PhpMyAdmin\Tests\Table; use PhpMyAdmin\Current; use PhpMyAdmin\Dbal\DatabaseInterface; -use PhpMyAdmin\Index; +use PhpMyAdmin\Indexes\Index; use PhpMyAdmin\Message; use PhpMyAdmin\Table\Indexes; use PhpMyAdmin\Table\Table;