Skip to content

Commit

Permalink
Move Routing class to the Routing namespace
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Jun 26, 2023
1 parent 9d3cb68 commit 50d97af
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions libraries/classes/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use PhpMyAdmin\Identifiers\TableName;
use PhpMyAdmin\Plugins\AuthenticationPlugin;
use PhpMyAdmin\Plugins\AuthenticationPluginFactory;
use PhpMyAdmin\Routing\Routing;
use PhpMyAdmin\SqlParser\Lexer;
use PhpMyAdmin\Theme\ThemeManager;
use PhpMyAdmin\Tracking\Tracker;
Expand Down
2 changes: 1 addition & 1 deletion libraries/classes/Command/CacheWarmupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use PhpMyAdmin\Config;
use PhpMyAdmin\DatabaseInterface;
use PhpMyAdmin\Routing;
use PhpMyAdmin\Routing\Routing;
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\Stubs\DbiDummy;
use RecursiveDirectoryIterator;
Expand Down
1 change: 1 addition & 0 deletions libraries/classes/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use PhpMyAdmin\Config\Settings\Server;
use PhpMyAdmin\Dbal\Connection;
use PhpMyAdmin\Exceptions\ConfigException;
use PhpMyAdmin\Routing\Routing;
use PhpMyAdmin\Theme\ThemeManager;
use Throwable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace PhpMyAdmin;
namespace PhpMyAdmin\Routing;

use FastRoute\DataGenerator\GroupCountBased as DataGeneratorGroupCountBased;
use FastRoute\Dispatcher;
Expand All @@ -13,7 +13,12 @@
use PhpMyAdmin\Controllers\Setup\MainController;
use PhpMyAdmin\Controllers\Setup\ShowConfigController;
use PhpMyAdmin\Controllers\Setup\ValidateController;
use PhpMyAdmin\Core;
use PhpMyAdmin\Http\ServerRequest;
use PhpMyAdmin\Message;
use PhpMyAdmin\ResponseRenderer;
use PhpMyAdmin\Sanitize;
use PhpMyAdmin\Template;
use Psr\Container\ContainerInterface;

use function __;
Expand Down
2 changes: 1 addition & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -9313,7 +9313,7 @@ parameters:
-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'FastRoute\\\\\\\\Dispatcher' and FastRoute\\\\Dispatcher will always evaluate to true\\.$#"
count: 4
path: test/classes/RoutingTest.php
path: test/classes/Routing/RoutingTest.php

-
message: "#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'PhpMyAdmin\\\\\\\\Server\\\\\\\\Plugin' and PhpMyAdmin\\\\Server\\\\Plugin will always evaluate to true\\.$#"
Expand Down
4 changes: 2 additions & 2 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11024,7 +11024,7 @@
<code><![CDATA['']]></code>
</TypeDoesNotContainType>
</file>
<file src="libraries/classes/Routing.php">
<file src="libraries/classes/Routing/Routing.php">
<InvalidArrayOffset>
<code><![CDATA[$GLOBALS['cfg']['environment']]]></code>
</InvalidArrayOffset>
Expand Down Expand Up @@ -14597,7 +14597,7 @@
<code>providerForTestIsUUIDSupported</code>
</PossiblyUnusedMethod>
</file>
<file src="test/classes/RoutingTest.php">
<file src="test/classes/Routing/RoutingTest.php">
<PossiblyUnusedMethod>
<code>providerForTestCleanupPathInfo</code>
</PossiblyUnusedMethod>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

declare(strict_types=1);

namespace PhpMyAdmin\Tests;
namespace PhpMyAdmin\Tests\Routing;

use FastRoute\Dispatcher;
use PhpMyAdmin\Controllers\HomeController;
use PhpMyAdmin\Routing;
use PhpMyAdmin\Routing\Routing;
use PhpMyAdmin\Tests\AbstractTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;

Expand Down

0 comments on commit 50d97af

Please sign in to comment.