Use PHPStan's new autoloading configuration setup

PHPStan version 0.12.26

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2020-06-08 16:27:56 -03:00
parent 2bda0e7138
commit 78ff0d0c63
5 changed files with 92 additions and 9 deletions

View File

@ -84,8 +84,8 @@
"php-webdriver/webdriver": "^1.8",
"phpmyadmin/coding-standard": "^2.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12.13",
"phpstan/phpstan-phpunit": "^0.12.6",
"phpstan/phpstan": "^0.12.26",
"phpstan/phpstan-phpunit": "^0.12.11",
"phpunit/phpunit": "^7.5 || ^8.0 || ^9.0",
"pragmarx/google2fa-qrcode": "^1.0.1",
"samyoul/u2f-php-server": "^1.1",

View File

@ -670,6 +670,11 @@ parameters:
count: 2
path: libraries/classes/Core.php
-
message: "#^Comparison operation \"\\<\" between 1 and 43 is always true\\.$#"
count: 1
path: libraries/classes/Core.php
-
message: "#^Cannot access offset 'query' on array\\(\\?'scheme' \\=\\> string, \\?'host' \\=\\> string, \\?'port' \\=\\> int, \\?'user' \\=\\> string, \\?'pass' \\=\\> string, \\?'path' \\=\\> string, \\?'query' \\=\\> string, \\?'fragment' \\=\\> string\\)\\|false\\.$#"
count: 1
@ -1265,6 +1270,21 @@ parameters:
count: 1
path: libraries/classes/Export.php
-
message: "#^Result of && is always false\\.$#"
count: 1
path: libraries/classes/Export.php
-
message: "#^Comparison operation \"\\>\\=\" between 1 and 43 is always false\\.$#"
count: 1
path: libraries/classes/Export.php
-
message: "#^Right side of \\|\\| is always false\\.$#"
count: 1
path: libraries/classes/Export.php
-
message: "#^Parameter \\#1 \\$str of static method PhpMyAdmin\\\\Encoding\\:\\:kanjiStrConv\\(\\) expects string, string\\|null given\\.$#"
count: 1
@ -2325,6 +2345,36 @@ parameters:
count: 1
path: libraries/classes/Plugins/Export/Helpers/TableProperty.php
-
message: "#^Method PhpMyAdmin\\\\Plugins\\\\ExportPlugin\\:\\:exportRoutines\\(\\) has no return typehint specified\\.$#"
count: 1
path: libraries/classes/Plugins/ExportPlugin.php
-
message: "#^Method PhpMyAdmin\\\\Plugins\\\\ExportPlugin\\:\\:exportRoutines\\(\\) has parameter \\$db with no typehint specified\\.$#"
count: 1
path: libraries/classes/Plugins/ExportPlugin.php
-
message: "#^Method PhpMyAdmin\\\\Plugins\\\\ExportPlugin\\:\\:initAlias\\(\\) has no return typehint specified\\.$#"
count: 1
path: libraries/classes/Plugins/ExportPlugin.php
-
message: "#^Method PhpMyAdmin\\\\Plugins\\\\ExportPlugin\\:\\:initAlias\\(\\) has parameter \\$aliases with no typehint specified\\.$#"
count: 1
path: libraries/classes/Plugins/ExportPlugin.php
-
message: "#^Method PhpMyAdmin\\\\Plugins\\\\ExportPlugin\\:\\:initAlias\\(\\) has parameter \\$db with no typehint specified\\.$#"
count: 1
path: libraries/classes/Plugins/ExportPlugin.php
-
message: "#^Method PhpMyAdmin\\\\Plugins\\\\ExportPlugin\\:\\:initAlias\\(\\) has parameter \\$table with no typehint specified\\.$#"
count: 1
path: libraries/classes/Plugins/ExportPlugin.php
-
message: "#^Cannot access offset 'foreign_table' on \\(array\\)\\|true\\.$#"
count: 1
@ -2570,11 +2620,6 @@ parameters:
count: 1
path: libraries/classes/Plugins/Schema/Dia/RelationStatsDia.php
-
message: "#^Binary operation \"\\+\" between int\\|string\\|false and 12 results in an error\\.$#"
count: 4
path: libraries/classes/Plugins/Schema/Dia/RelationStatsDia.php
-
message: "#^Property PhpMyAdmin\\\\Plugins\\\\Schema\\\\Dia\\\\TableStatsDia\\:\\:\\$tableId has no typehint specified\\.$#"
count: 1
@ -4085,6 +4130,26 @@ parameters:
count: 1
path: libraries/classes/Transformations.php
-
message: "#^Method PhpMyAdmin\\\\Transformations\\:\\:clear\\(\\) has no return typehint specified\\.$#"
count: 1
path: libraries/classes/Transformations.php
-
message: "#^Method PhpMyAdmin\\\\Transformations\\:\\:clear\\(\\) has parameter \\$column with no typehint specified\\.$#"
count: 1
path: libraries/classes/Transformations.php
-
message: "#^Method PhpMyAdmin\\\\Transformations\\:\\:clear\\(\\) has parameter \\$db with no typehint specified\\.$#"
count: 1
path: libraries/classes/Transformations.php
-
message: "#^Method PhpMyAdmin\\\\Transformations\\:\\:clear\\(\\) has parameter \\$table with no typehint specified\\.$#"
count: 1
path: libraries/classes/Transformations.php
-
message: "#^Parameter \\#1 \\$node of method Twig\\\\Compiler\\:\\:subcompile\\(\\) expects Twig\\\\Node\\\\Node, Twig\\\\Node\\\\Node\\|null given\\.$#"
count: 1

View File

@ -4,7 +4,11 @@ parameters:
level: max
paths:
- .
bootstrap: test/bootstrap-static.php
scanFiles:
- libraries/vendor_config.php
- vendor/phpmyadmin/motranslator/src/functions.php
bootstrapFiles:
- test/phpstan-constants.php
reportUnmatchedIgnoredErrors: true
inferPrivatePropertyTypeFromConstructor: true
checkMissingIterableValueType: false

View File

@ -1,6 +1,6 @@
<?php
/**
* Bootstrap file for phpstan and psalm
* Bootstrap file for psalm
*/
declare(strict_types=1);

View File

@ -0,0 +1,14 @@
<?php
declare(strict_types=1);
define('ROOT_PATH', dirname(__DIR__) . DIRECTORY_SEPARATOR);
define('PMA_VERSION', '5.1.0-dev');
define('PMA_MAJOR_VERSION', '5.1');
define('PROXY_URL', '');
define('PROXY_USER', '');
define('PROXY_PASS', '');
define('PMA_USR_BROWSER_AGENT', 'Other');
define('PMA_USR_BROWSER_VER', 1);
define('PMA_USR_OS', 'os');
define('PMA_IS_WINDOWS', false);