Move error related classes to the Error namespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
a5850a03ee
commit
a858f08fec
@ -19,8 +19,8 @@ use PhpMyAdmin\Database\Events;
|
||||
use PhpMyAdmin\Database\Routines;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\DbTableExists;
|
||||
use PhpMyAdmin\ErrorHandler;
|
||||
use PhpMyAdmin\ErrorReport;
|
||||
use PhpMyAdmin\Error\ErrorHandler;
|
||||
use PhpMyAdmin\Error\ErrorReport;
|
||||
use PhpMyAdmin\Export\Export;
|
||||
use PhpMyAdmin\Export\Options;
|
||||
use PhpMyAdmin\Export\TemplateModel;
|
||||
|
||||
@ -7908,167 +7908,167 @@ parameters:
|
||||
-
|
||||
message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
|
||||
count: 3
|
||||
path: src/Error.php
|
||||
path: src/Error/Error.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'args' on mixed\\.$#"
|
||||
count: 1
|
||||
path: src/Error.php
|
||||
path: src/Error/Error.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'class' on mixed\\.$#"
|
||||
count: 1
|
||||
path: src/Error.php
|
||||
path: src/Error/Error.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'class'\\|'function'\\|'line'\\|'type' on mixed\\.$#"
|
||||
count: 1
|
||||
path: src/Error.php
|
||||
path: src/Error/Error.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'file' on mixed\\.$#"
|
||||
count: 2
|
||||
path: src/Error.php
|
||||
path: src/Error/Error.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'function' on mixed\\.$#"
|
||||
count: 1
|
||||
path: src/Error.php
|
||||
path: src/Error/Error.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'line' on mixed\\.$#"
|
||||
count: 1
|
||||
path: src/Error.php
|
||||
path: src/Error/Error.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'type' on mixed\\.$#"
|
||||
count: 1
|
||||
path: src/Error.php
|
||||
path: src/Error/Error.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset mixed on mixed\\.$#"
|
||||
count: 1
|
||||
path: src/Error.php
|
||||
path: src/Error/Error.php
|
||||
|
||||
-
|
||||
message: "#^Match expression does not handle remaining values\\: 3\\|int\\<min, \\-1\\>\\|int\\<5, 7\\>\\|int\\<9, 15\\>\\|int\\<17, 31\\>\\|int\\<33, 63\\>\\|int\\<65, 127\\>\\|int\\<129, 255\\>\\|int\\<257, 511\\>\\|int\\<513, 1023\\>\\|int\\<1025, 2047\\>\\|int\\<2049, 4095\\>\\|int\\<4097, 8191\\>\\|int\\<8193, 16383\\>\\|int\\<16385, max\\>$#"
|
||||
count: 2
|
||||
path: src/Error.php
|
||||
path: src/Error/Error.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in \\|\\|, int\\<0, 18176\\> given on the right side\\.$#"
|
||||
count: 1
|
||||
path: src/Error.php
|
||||
path: src/Error/Error.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$path of static method PhpMyAdmin\\\\Error\\:\\:relPath\\(\\) expects string, mixed given\\.$#"
|
||||
message: "#^Parameter \\#1 \\$path of static method PhpMyAdmin\\\\Error\\\\Error\\:\\:relPath\\(\\) expects string, mixed given\\.$#"
|
||||
count: 3
|
||||
path: src/Error.php
|
||||
path: src/Error/Error.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$step of static method PhpMyAdmin\\\\Error\\:\\:getFunctionCall\\(\\) expects array, mixed given\\.$#"
|
||||
message: "#^Parameter \\#1 \\$step of static method PhpMyAdmin\\\\Error\\\\Error\\:\\:getFunctionCall\\(\\) expects array, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Error.php
|
||||
path: src/Error/Error.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
|
||||
count: 2
|
||||
path: src/Error.php
|
||||
path: src/Error/Error.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$function of static method PhpMyAdmin\\\\Error\\:\\:getArg\\(\\) expects string, mixed given\\.$#"
|
||||
message: "#^Parameter \\#2 \\$function of static method PhpMyAdmin\\\\Error\\\\Error\\:\\:getArg\\(\\) expects string, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Error.php
|
||||
path: src/Error/Error.php
|
||||
|
||||
-
|
||||
message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
|
||||
count: 1
|
||||
path: src/ErrorHandler.php
|
||||
path: src/Error/ErrorHandler.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset \\(int\\|string\\) on mixed\\.$#"
|
||||
count: 1
|
||||
path: src/ErrorHandler.php
|
||||
path: src/Error/ErrorHandler.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset string on mixed\\.$#"
|
||||
count: 1
|
||||
path: src/ErrorHandler.php
|
||||
path: src/Error/ErrorHandler.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/ErrorHandler.php
|
||||
path: src/Error/ErrorHandler.php
|
||||
|
||||
-
|
||||
message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
|
||||
count: 2
|
||||
path: src/ErrorReport.php
|
||||
path: src/Error/ErrorReport.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'context' on mixed\\.$#"
|
||||
count: 1
|
||||
path: src/ErrorReport.php
|
||||
path: src/Error/ErrorReport.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'scriptname' on mixed\\.$#"
|
||||
count: 1
|
||||
path: src/ErrorReport.php
|
||||
path: src/Error/ErrorReport.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'stack' on mixed\\.$#"
|
||||
count: 1
|
||||
path: src/ErrorReport.php
|
||||
path: src/Error/ErrorReport.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'uri' on mixed\\.$#"
|
||||
count: 3
|
||||
path: src/ErrorReport.php
|
||||
path: src/Error/ErrorReport.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'url' on mixed\\.$#"
|
||||
count: 4
|
||||
path: src/ErrorReport.php
|
||||
path: src/Error/ErrorReport.php
|
||||
|
||||
-
|
||||
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
|
||||
count: 2
|
||||
path: src/ErrorReport.php
|
||||
path: src/Error/ErrorReport.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in &&, int\\|false given on the right side\\.$#"
|
||||
count: 1
|
||||
path: src/ErrorReport.php
|
||||
path: src/Error/ErrorReport.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, int given\\.$#"
|
||||
count: 1
|
||||
path: src/ErrorReport.php
|
||||
path: src/Error/ErrorReport.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in a negated boolean, string given\\.$#"
|
||||
count: 1
|
||||
path: src/ErrorReport.php
|
||||
path: src/Error/ErrorReport.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$stack of method PhpMyAdmin\\\\ErrorReport\\:\\:translateStacktrace\\(\\) expects array, mixed given\\.$#"
|
||||
message: "#^Parameter \\#1 \\$stack of method PhpMyAdmin\\\\Error\\\\ErrorReport\\:\\:translateStacktrace\\(\\) expects array, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/ErrorReport.php
|
||||
path: src/Error/ErrorReport.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$string of function mb_strlen expects string, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/ErrorReport.php
|
||||
path: src/Error/ErrorReport.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$string of function mb_substr expects string, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/ErrorReport.php
|
||||
path: src/Error/ErrorReport.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$url of method PhpMyAdmin\\\\ErrorReport\\:\\:sanitizeUrl\\(\\) expects string, mixed given\\.$#"
|
||||
message: "#^Parameter \\#1 \\$url of method PhpMyAdmin\\\\Error\\\\ErrorReport\\:\\:sanitizeUrl\\(\\) expects string, mixed given\\.$#"
|
||||
count: 3
|
||||
path: src/ErrorReport.php
|
||||
path: src/Error/ErrorReport.php
|
||||
|
||||
-
|
||||
message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
|
||||
@ -17098,7 +17098,7 @@ parameters:
|
||||
-
|
||||
message: "#^Property PhpMyAdmin\\\\Config\\:\\:\\$settings \\(array\\{PmaAbsoluteUri\\: string, AuthLog\\: string, AuthLogSuccess\\: bool, PmaNoRelation_DisableWarning\\: bool, SuhosinDisableWarning\\: bool, LoginCookieValidityDisableWarning\\: bool, ReservedWordDisableWarning\\: bool, TranslationWarningThreshold\\: int, \\.\\.\\.\\}\\) does not accept array\\{PmaAbsoluteUri\\: string, AuthLog\\: string, AuthLogSuccess\\: bool, PmaNoRelation_DisableWarning\\: bool, SuhosinDisableWarning\\: bool, LoginCookieValidityDisableWarning\\: bool, ReservedWordDisableWarning\\: bool, TranslationWarningThreshold\\: int, \\.\\.\\.\\}\\.$#"
|
||||
count: 1
|
||||
path: tests/classes/ErrorHandlerTest.php
|
||||
path: tests/classes/Error/ErrorHandlerTest.php
|
||||
|
||||
-
|
||||
message: "#^Property PhpMyAdmin\\\\Config\\:\\:\\$settings \\(array\\{PmaAbsoluteUri\\: string, AuthLog\\: string, AuthLogSuccess\\: bool, PmaNoRelation_DisableWarning\\: bool, SuhosinDisableWarning\\: bool, LoginCookieValidityDisableWarning\\: bool, ReservedWordDisableWarning\\: bool, TranslationWarningThreshold\\: int, \\.\\.\\.\\}\\) does not accept array\\{PmaAbsoluteUri\\: string, AuthLog\\: string, AuthLogSuccess\\: bool, PmaNoRelation_DisableWarning\\: bool, SuhosinDisableWarning\\: bool, LoginCookieValidityDisableWarning\\: bool, ReservedWordDisableWarning\\: bool, TranslationWarningThreshold\\: int, \\.\\.\\.\\}\\.$#"
|
||||
|
||||
@ -5639,7 +5639,7 @@
|
||||
<code>getPageDocumentation</code>
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="src/Error.php">
|
||||
<file src="src/Error/Error.php">
|
||||
<MixedArgument>
|
||||
<code>$arg</code>
|
||||
<code>$step</code>
|
||||
@ -5679,7 +5679,7 @@
|
||||
<code><![CDATA[$step['line']]]></code>
|
||||
</MixedOperand>
|
||||
</file>
|
||||
<file src="src/ErrorHandler.php">
|
||||
<file src="src/Error/ErrorHandler.php">
|
||||
<DeprecatedMethod>
|
||||
<code>Config::getInstance()</code>
|
||||
<code>Config::getInstance()</code>
|
||||
@ -5703,7 +5703,7 @@
|
||||
<code>$hash</code>
|
||||
</MixedAssignment>
|
||||
</file>
|
||||
<file src="src/ErrorReport.php">
|
||||
<file src="src/Error/ErrorReport.php">
|
||||
<MixedArgument>
|
||||
<code><![CDATA[$level['url']]]></code>
|
||||
<code>$line</code>
|
||||
@ -13958,7 +13958,7 @@
|
||||
<code>providerFortTestResolveTypeSize</code>
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="tests/classes/ErrorHandlerTest.php">
|
||||
<file src="tests/classes/Error/ErrorHandlerTest.php">
|
||||
<DeprecatedMethod>
|
||||
<code>Config::getInstance()</code>
|
||||
<code>Config::getInstance()</code>
|
||||
@ -13975,7 +13975,7 @@
|
||||
<code><![CDATA[$config->settings]]></code>
|
||||
</PropertyTypeCoercion>
|
||||
</file>
|
||||
<file src="tests/classes/ErrorReportTest.php">
|
||||
<file src="tests/classes/Error/ErrorReportTest.php">
|
||||
<DeprecatedMethod>
|
||||
<code>Config::getInstance()</code>
|
||||
<code>Config::getInstance()</code>
|
||||
@ -13992,7 +13992,7 @@
|
||||
<code>urlsToSanitize</code>
|
||||
</PossiblyUnusedMethod>
|
||||
</file>
|
||||
<file src="tests/classes/ErrorTest.php">
|
||||
<file src="tests/classes/Error/ErrorTest.php">
|
||||
<PossiblyUnusedMethod>
|
||||
<code>filePathProvider</code>
|
||||
</PossiblyUnusedMethod>
|
||||
|
||||
@ -8,6 +8,7 @@ use Fig\Http\Message\StatusCodeInterface;
|
||||
use Laminas\HttpHandlerRunner\Emitter\SapiEmitter;
|
||||
use Laminas\HttpHandlerRunner\RequestHandlerRunner;
|
||||
use PhpMyAdmin\Container\ContainerBuilder;
|
||||
use PhpMyAdmin\Error\ErrorHandler;
|
||||
use PhpMyAdmin\Http\Factory\ResponseFactory;
|
||||
use PhpMyAdmin\Http\Factory\ServerRequestFactory;
|
||||
use PhpMyAdmin\Http\Handler\ApplicationHandler;
|
||||
|
||||
@ -10,8 +10,8 @@ namespace PhpMyAdmin\Controllers;
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\ConfigStorage\Relation;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\ErrorHandler;
|
||||
use PhpMyAdmin\ErrorReport;
|
||||
use PhpMyAdmin\Error\ErrorHandler;
|
||||
use PhpMyAdmin\Error\ErrorReport;
|
||||
use PhpMyAdmin\Http\ServerRequest;
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\ResponseRenderer;
|
||||
|
||||
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\Error\ErrorHandler;
|
||||
use PhpMyAdmin\Exceptions\MissingExtensionException;
|
||||
use PhpMyAdmin\Http\ServerRequest;
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ use PhpMyAdmin\Dbal\DbiMysqli;
|
||||
use PhpMyAdmin\Dbal\ResultInterface;
|
||||
use PhpMyAdmin\Dbal\Statement;
|
||||
use PhpMyAdmin\Dbal\Warning;
|
||||
use PhpMyAdmin\Error\ErrorHandler;
|
||||
use PhpMyAdmin\Html\Generator;
|
||||
use PhpMyAdmin\Identifiers\DatabaseName;
|
||||
use PhpMyAdmin\Query\Cache;
|
||||
|
||||
@ -2,8 +2,10 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin;
|
||||
namespace PhpMyAdmin\Error;
|
||||
|
||||
use PhpMyAdmin\Message;
|
||||
use PhpMyAdmin\Template;
|
||||
use Throwable;
|
||||
|
||||
use function array_pop;
|
||||
@ -153,7 +155,7 @@ class Error extends Message
|
||||
}
|
||||
|
||||
/**
|
||||
* sets PhpMyAdmin\Error::$_backtrace
|
||||
* sets PhpMyAdmin\Error\Error::$_backtrace
|
||||
*
|
||||
* We don't store full arguments to avoid wakeup or memory problems.
|
||||
*
|
||||
@ -165,7 +167,7 @@ class Error extends Message
|
||||
}
|
||||
|
||||
/**
|
||||
* sets PhpMyAdmin\Error::$_line
|
||||
* sets PhpMyAdmin\Error\Error::$_line
|
||||
*
|
||||
* @param int $line the line
|
||||
*/
|
||||
@ -175,7 +177,7 @@ class Error extends Message
|
||||
}
|
||||
|
||||
/**
|
||||
* sets PhpMyAdmin\Error::$_file
|
||||
* sets PhpMyAdmin\Error\Error::$_file
|
||||
*
|
||||
* @param string $file the file
|
||||
*/
|
||||
@ -185,9 +187,9 @@ class Error extends Message
|
||||
}
|
||||
|
||||
/**
|
||||
* returns unique PhpMyAdmin\Error::$hash, if not exists it will be created
|
||||
* returns unique PhpMyAdmin\Error\Error::$hash, if not exists it will be created
|
||||
*
|
||||
* @return string PhpMyAdmin\Error::$hash
|
||||
* @return string PhpMyAdmin\Error\Error::$hash
|
||||
*/
|
||||
public function getHash(): string
|
||||
{
|
||||
@ -211,13 +213,13 @@ class Error extends Message
|
||||
}
|
||||
|
||||
/**
|
||||
* returns PhpMyAdmin\Error::$_backtrace for first $count frames
|
||||
* returns PhpMyAdmin\Error\Error::$_backtrace for first $count frames
|
||||
* pass $count = -1 to get full backtrace.
|
||||
* The same can be done by not passing $count at all.
|
||||
*
|
||||
* @param int $count Number of stack frames.
|
||||
*
|
||||
* @return mixed[] PhpMyAdmin\Error::$_backtrace
|
||||
* @return mixed[] PhpMyAdmin\Error\Error::$_backtrace
|
||||
*/
|
||||
public function getBacktrace(int $count = -1): array
|
||||
{
|
||||
@ -229,9 +231,9 @@ class Error extends Message
|
||||
}
|
||||
|
||||
/**
|
||||
* returns PhpMyAdmin\Error::$file
|
||||
* returns PhpMyAdmin\Error\Error::$file
|
||||
*
|
||||
* @return string PhpMyAdmin\Error::$file
|
||||
* @return string PhpMyAdmin\Error\Error::$file
|
||||
*/
|
||||
public function getFile(): string
|
||||
{
|
||||
@ -239,9 +241,9 @@ class Error extends Message
|
||||
}
|
||||
|
||||
/**
|
||||
* returns PhpMyAdmin\Error::$line
|
||||
* returns PhpMyAdmin\Error\Error::$line
|
||||
*
|
||||
* @return int PhpMyAdmin\Error::$line
|
||||
* @return int PhpMyAdmin\Error\Error::$line
|
||||
*/
|
||||
public function getLine(): int
|
||||
{
|
||||
@ -485,7 +487,7 @@ class Error extends Message
|
||||
|
||||
$hereParts = explode(
|
||||
DIRECTORY_SEPARATOR,
|
||||
(string) realpath(__DIR__ . DIRECTORY_SEPARATOR . '..'),
|
||||
(string) realpath(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..'),
|
||||
);
|
||||
$destParts = explode(DIRECTORY_SEPARATOR, $dest);
|
||||
|
||||
@ -494,7 +496,7 @@ class Error extends Message
|
||||
while (implode(DIRECTORY_SEPARATOR, $destParts) !== implode(DIRECTORY_SEPARATOR, $hereParts)) {
|
||||
if (count($hereParts) > count($destParts)) {
|
||||
array_pop($hereParts);
|
||||
$result .= DIRECTORY_SEPARATOR . '..';
|
||||
$result .= DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..';
|
||||
} else {
|
||||
array_pop($destParts);
|
||||
}
|
||||
@ -2,13 +2,17 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin;
|
||||
namespace PhpMyAdmin\Error;
|
||||
|
||||
use ErrorException;
|
||||
use Fig\Http\Message\StatusCodeInterface;
|
||||
use Laminas\HttpHandlerRunner\Emitter\SapiEmitter;
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\Current;
|
||||
use PhpMyAdmin\Exceptions\ExitException;
|
||||
use PhpMyAdmin\Http\Factory\ResponseFactory;
|
||||
use PhpMyAdmin\ResponseRenderer;
|
||||
use PhpMyAdmin\Url;
|
||||
use Throwable;
|
||||
|
||||
use function __;
|
||||
@ -2,10 +2,14 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin;
|
||||
namespace PhpMyAdmin\Error;
|
||||
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\ConfigStorage\Relation;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Utils\HttpRequest;
|
||||
use PhpMyAdmin\Version;
|
||||
|
||||
use function count;
|
||||
use function http_build_query;
|
||||
@ -8,6 +8,7 @@ declare(strict_types=1);
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\ConfigStorage\Relation;
|
||||
use PhpMyAdmin\Error\ErrorHandler;
|
||||
use PhpMyAdmin\Routing\Routing;
|
||||
use Traversable;
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Http\Middleware;
|
||||
|
||||
use PhpMyAdmin\ErrorHandler;
|
||||
use PhpMyAdmin\Error\ErrorHandler;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Server\MiddlewareInterface;
|
||||
|
||||
@ -6,7 +6,7 @@ namespace PhpMyAdmin\Http\Middleware;
|
||||
|
||||
use Fig\Http\Message\StatusCodeInterface;
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\ErrorHandler;
|
||||
use PhpMyAdmin\Error\ErrorHandler;
|
||||
use PhpMyAdmin\Exceptions\SessionHandlerException;
|
||||
use PhpMyAdmin\Http\Factory\ResponseFactory;
|
||||
use PhpMyAdmin\LanguageManager;
|
||||
|
||||
@ -9,7 +9,7 @@ namespace PhpMyAdmin\Plugins\Auth;
|
||||
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\ErrorHandler;
|
||||
use PhpMyAdmin\Error\ErrorHandler;
|
||||
use PhpMyAdmin\Html\Generator;
|
||||
use PhpMyAdmin\Plugins\AuthenticationPlugin;
|
||||
use PhpMyAdmin\ResponseRenderer;
|
||||
|
||||
@ -10,7 +10,7 @@ namespace PhpMyAdmin\Plugins\Auth;
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\Core;
|
||||
use PhpMyAdmin\Current;
|
||||
use PhpMyAdmin\ErrorHandler;
|
||||
use PhpMyAdmin\Error\ErrorHandler;
|
||||
use PhpMyAdmin\Exceptions\SessionHandlerException;
|
||||
use PhpMyAdmin\LanguageManager;
|
||||
use PhpMyAdmin\Message;
|
||||
|
||||
@ -6,7 +6,7 @@ namespace PhpMyAdmin\Query;
|
||||
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\Dbal\ResultInterface;
|
||||
use PhpMyAdmin\Error;
|
||||
use PhpMyAdmin\Error\Error;
|
||||
use PhpMyAdmin\Url;
|
||||
|
||||
use function __;
|
||||
|
||||
@ -10,6 +10,7 @@ namespace PhpMyAdmin;
|
||||
use Fig\Http\Message\StatusCodeInterface;
|
||||
use PhpMyAdmin\Bookmarks\BookmarkRepository;
|
||||
use PhpMyAdmin\ConfigStorage\Relation;
|
||||
use PhpMyAdmin\Error\ErrorHandler;
|
||||
use PhpMyAdmin\Exceptions\ExitException;
|
||||
use PhpMyAdmin\Http\Factory\ResponseFactory;
|
||||
use PhpMyAdmin\Http\Response;
|
||||
|
||||
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin;
|
||||
|
||||
use PhpMyAdmin\Error\ErrorHandler;
|
||||
use PhpMyAdmin\Exceptions\SessionHandlerException;
|
||||
|
||||
use function htmlspecialchars;
|
||||
@ -72,7 +73,7 @@ class Session
|
||||
/**
|
||||
* Session failed function
|
||||
*
|
||||
* @param mixed[] $errors PhpMyAdmin\ErrorHandler array
|
||||
* @param mixed[] $errors PhpMyAdmin\Error\ErrorHandler array
|
||||
*
|
||||
* @throws SessionHandlerException
|
||||
*/
|
||||
|
||||
@ -7,7 +7,7 @@ namespace PhpMyAdmin\Tests;
|
||||
use PhpMyAdmin\Application;
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\Container\ContainerBuilder;
|
||||
use PhpMyAdmin\ErrorHandler;
|
||||
use PhpMyAdmin\Error\ErrorHandler;
|
||||
use PhpMyAdmin\Exceptions\ConfigException;
|
||||
use PhpMyAdmin\Http\Factory\ResponseFactory;
|
||||
use PhpMyAdmin\Template;
|
||||
|
||||
@ -2,14 +2,15 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Tests;
|
||||
namespace PhpMyAdmin\Tests\Error;
|
||||
|
||||
use Exception;
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Error;
|
||||
use PhpMyAdmin\ErrorHandler;
|
||||
use PhpMyAdmin\Error\Error;
|
||||
use PhpMyAdmin\Error\ErrorHandler;
|
||||
use PhpMyAdmin\Exceptions\ExitException;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use PHPUnit\Framework\Attributes\Group;
|
||||
@ -2,14 +2,15 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Tests;
|
||||
namespace PhpMyAdmin\Tests\Error;
|
||||
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\ConfigStorage\Relation;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\Error;
|
||||
use PhpMyAdmin\ErrorReport;
|
||||
use PhpMyAdmin\Error\Error;
|
||||
use PhpMyAdmin\Error\ErrorReport;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PhpMyAdmin\Tests\Stubs\DbiDummy;
|
||||
use PhpMyAdmin\Utils\HttpRequest;
|
||||
use PhpMyAdmin\Version;
|
||||
@ -2,9 +2,10 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Tests;
|
||||
namespace PhpMyAdmin\Tests\Error;
|
||||
|
||||
use PhpMyAdmin\Error;
|
||||
use PhpMyAdmin\Error\Error;
|
||||
use PhpMyAdmin\Tests\AbstractTestCase;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
|
||||
@ -46,7 +47,7 @@ class ErrorTest extends AbstractTestCase
|
||||
{
|
||||
$bt = [['file' => 'bt1', 'line' => 2, 'function' => 'bar', 'args' => ['foo' => $this]]];
|
||||
$this->object->setBacktrace($bt);
|
||||
$bt[0]['args']['foo'] = '<Class:PhpMyAdmin\Tests\ErrorTest>';
|
||||
$bt[0]['args']['foo'] = '<Class:PhpMyAdmin\Tests\Error\ErrorTest>';
|
||||
$this->assertEquals($bt, $this->object->getBacktrace());
|
||||
}
|
||||
|
||||
@ -84,7 +85,7 @@ class ErrorTest extends AbstractTestCase
|
||||
[
|
||||
__FILE__,
|
||||
'.' . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR
|
||||
. 'classes' . DIRECTORY_SEPARATOR . 'ErrorTest.php',
|
||||
. 'classes' . DIRECTORY_SEPARATOR . 'Error' . DIRECTORY_SEPARATOR . 'ErrorTest.php',
|
||||
],
|
||||
['./NONEXISTING', 'NONEXISTING'],
|
||||
];
|
||||
@ -107,7 +108,7 @@ class ErrorTest extends AbstractTestCase
|
||||
public function testGetBacktraceDisplay(): void
|
||||
{
|
||||
$this->assertStringContainsString(
|
||||
'PHPUnit\Framework\TestRunner->run(<Class:PhpMyAdmin\Tests\ErrorTest>)',
|
||||
'PHPUnit\Framework\TestRunner->run(<Class:PhpMyAdmin\Tests\Error\ErrorTest>)',
|
||||
$this->object->getBacktraceDisplay(),
|
||||
);
|
||||
}
|
||||
@ -125,7 +126,8 @@ class ErrorTest extends AbstractTestCase
|
||||
$actual,
|
||||
);
|
||||
$this->assertStringContainsString(
|
||||
'PHPUnit\Framework\TestRunner->run(<Class:PhpMyAdmin\Tests\ErrorTest>)</li><li class="list-group-item">',
|
||||
'PHPUnit\Framework\TestRunner->run(<Class:PhpMyAdmin\Tests\Error\ErrorTest>)</li>'
|
||||
. '<li class="list-group-item">',
|
||||
$actual,
|
||||
);
|
||||
$this->assertStringEndsWith('</li></ol></div>' . "\n", $actual);
|
||||
@ -7,7 +7,7 @@ namespace PhpMyAdmin\Tests\Plugins\Auth;
|
||||
use PhpMyAdmin\Config;
|
||||
use PhpMyAdmin\Current;
|
||||
use PhpMyAdmin\DatabaseInterface;
|
||||
use PhpMyAdmin\ErrorHandler;
|
||||
use PhpMyAdmin\Error\ErrorHandler;
|
||||
use PhpMyAdmin\Exceptions\ExitException;
|
||||
use PhpMyAdmin\Plugins\Auth\AuthenticationCookie;
|
||||
use PhpMyAdmin\ResponseRenderer;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user