From 5723fe99f00d30d4d5fa83e4a717a9620a9d4ec5 Mon Sep 17 00:00:00 2001 From: Kristijan Fremen Velkovski Date: Sat, 19 Nov 2022 20:48:45 +0000 Subject: [PATCH 1/6] Translated using Weblate (Macedonian) Currently translated at 21.8% (746 of 3418 strings) [ci skip] Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/mk/ Signed-off-by: Kristijan Fremen Velkovski --- po/mk.po | 40 +++++++++++----------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/po/mk.po b/po/mk.po index 99e01df4de..33e11ed2e3 100644 --- a/po/mk.po +++ b/po/mk.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 5.2.1-dev\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2022-09-29 00:17-0300\n" -"PO-Revision-Date: 2022-11-18 12:59+0000\n" +"PO-Revision-Date: 2022-11-20 04:54+0000\n" "Last-Translator: Kristijan Fremen Velkovski \n" "Language-Team: Macedonian \n" @@ -4794,9 +4794,8 @@ msgid "Could not connect to the database server!" msgstr "" #: libraries/classes/Config/Validator.php:279 -#, fuzzy msgid "Invalid authentication type!" -msgstr "Тип на извоз" +msgstr "Невалиден тип на автентикација!" #: libraries/classes/Config/Validator.php:284 msgid "Empty username while using [kbd]config[/kbd] authentication method!" @@ -5338,22 +5337,16 @@ msgid "You are about to DELETE all the rows of the table!" msgstr "Со ова ги БРИШЕТЕ(DELETE) сите редови на табелата!" #: libraries/classes/Controllers/JavaScriptMessagesController.php:48 -#, fuzzy -#| msgid "Delete tracking data for this table" msgid "Delete tracking data for this table?" -msgstr "Избришете го податоците за тракирање од табелава" +msgstr "Избришете ги податоците за тракирање од оваа табела?" #: libraries/classes/Controllers/JavaScriptMessagesController.php:49 -#, fuzzy -#| msgid "Delete tracking data for this table" msgid "Delete tracking data for these tables?" -msgstr "Избришете го податоците за тракирање од табелава" +msgstr "Избришете ги податоците за тракирање од овие табели?" #: libraries/classes/Controllers/JavaScriptMessagesController.php:50 -#, fuzzy -#| msgid "Delete tracking data for this table" msgid "Delete tracking data for this version?" -msgstr "Избришете го податоците за тракирање од табелава" +msgstr "Избришете ги податоците за тракирање за оваа верзија?" #: libraries/classes/Controllers/JavaScriptMessagesController.php:51 #, fuzzy @@ -5496,10 +5489,8 @@ msgid "Missing value in the form!" msgstr "Недостасува вредност во образецот!" #: libraries/classes/Controllers/JavaScriptMessagesController.php:103 -#, fuzzy -#| msgid "at least one of the words" msgid "Select at least one of the options!" -msgstr "барем еден од зборовите" +msgstr "Изберете барем една од опциите!" #: libraries/classes/Controllers/JavaScriptMessagesController.php:104 msgid "Please enter a valid number!" @@ -6297,10 +6288,8 @@ msgid "Formatting SQL…" msgstr "" #: libraries/classes/Controllers/JavaScriptMessagesController.php:321 -#, fuzzy -#| msgid "Add new field" msgid "No parameters found!" -msgstr "Додади ново поле" +msgstr "Не беа најдени параметрите!" #: libraries/classes/Controllers/JavaScriptMessagesController.php:325 #: templates/database/central_columns/main.twig:269 @@ -6357,9 +6346,8 @@ msgid "Processing request" msgstr "Листа на процеси" #: libraries/classes/Controllers/JavaScriptMessagesController.php:335 -#, fuzzy msgid "Request failed!!" -msgstr "Вид на упит" +msgstr "Барањето не успеа!!" #: libraries/classes/Controllers/JavaScriptMessagesController.php:336 #: libraries/classes/Controllers/Sql/EnumValuesController.php:51 @@ -6682,10 +6670,8 @@ msgid "" msgstr "" #: libraries/classes/Controllers/JavaScriptMessagesController.php:422 -#, fuzzy -#| msgid "No databases selected." msgid "No partial dependencies selected!" -msgstr "Не е избрана ни една база на податоци." +msgstr "Не беа избрани деловни зависности!" #: libraries/classes/Controllers/JavaScriptMessagesController.php:423 #: libraries/classes/Export.php:587 libraries/classes/Html/Generator.php:987 @@ -6740,10 +6726,8 @@ msgid "Selected dependencies are as follows:" msgstr "" #: libraries/classes/Controllers/JavaScriptMessagesController.php:438 -#, fuzzy -#| msgid "No databases selected." msgid "No dependencies selected!" -msgstr "Не е избрана ни една база на податоци." +msgstr "Не беа избрани зависностите!" #: libraries/classes/Controllers/JavaScriptMessagesController.php:441 #: templates/columns_definitions/column_definitions_form.twig:160 @@ -7292,10 +7276,8 @@ msgid "Successfully copied!" msgstr "" #: libraries/classes/Controllers/JavaScriptMessagesController.php:650 -#, fuzzy -#| msgid "Copy database to" msgid "Copying failed!" -msgstr "Копирај ја базата на податоци во" +msgstr "Копирањето не успеа!" #: libraries/classes/Controllers/JavaScriptMessagesController.php:653 #, fuzzy From 87e44947a602ff1463cbdfd8a07e363fdc918a1b Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sun, 20 Nov 2022 11:14:32 +0100 Subject: [PATCH 2/6] Fix big performance issue making CPU 100% when scrolling the textarea of an export of #17902 data Data can be found on #17902 (https://github.com/phpmyadmin/phpmyadmin/issues/17902#issuecomment-1321082358) I changed the events to not bind all the document but only the root node they needed. Scrolling is way better now I used chrome coverage mode to ensure the code is still called and tested it. Signed-off-by: William Desportes --- js/src/navigation.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/js/src/navigation.js b/js/src/navigation.js index 4562a3fd9c..025a85ef82 100644 --- a/js/src/navigation.js +++ b/js/src/navigation.js @@ -411,15 +411,15 @@ $(function () { /** * Bind all "fast filter" events */ - $(document).on('click', '#pma_navigation_tree li.fast_filter button.searchClauseClear', Navigation.FastFilter.events.clear); - $(document).on('focus', '#pma_navigation_tree li.fast_filter input.searchClause', Navigation.FastFilter.events.focus); - $(document).on('blur', '#pma_navigation_tree li.fast_filter input.searchClause', Navigation.FastFilter.events.blur); - $(document).on('keyup', '#pma_navigation_tree li.fast_filter input.searchClause', Navigation.FastFilter.events.keyup); + $('#pma_navigation_tree').on('click', 'li.fast_filter button.searchClauseClear', Navigation.FastFilter.events.clear); + $('#pma_navigation_tree').on('focus', 'li.fast_filter input.searchClause', Navigation.FastFilter.events.focus); + $('#pma_navigation_tree').on('blur', 'li.fast_filter input.searchClause', Navigation.FastFilter.events.blur); + $('#pma_navigation_tree').on('keyup', 'li.fast_filter input.searchClause', Navigation.FastFilter.events.keyup); /** * Ajax handler for pagination */ - $(document).on('click', '#pma_navigation_tree div.pageselector a.ajax', function (event) { + $('#pma_navigation_tree').on('click', 'div.pageselector a.ajax', function (event) { event.preventDefault(); Navigation.treePagination($(this)); }); @@ -427,18 +427,18 @@ $(function () { /** * Node highlighting */ - $(document).on( + $('#pma_navigation_tree.highlight').on( 'mouseover', - '#pma_navigation_tree.highlight li:not(.fast_filter)', + 'li:not(.fast_filter)', function () { if ($('li:visible', this).length === 0) { $(this).addClass('activePointer'); } } ); - $(document).on( + $('#pma_navigation_tree.highlight').on( 'mouseout', - '#pma_navigation_tree.highlight li:not(.fast_filter)', + 'li:not(.fast_filter)', function () { $(this).removeClass('activePointer'); } From d88ef680da8e73699fbebde4cde8fcab2ac5b8e8 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sun, 20 Nov 2022 11:29:47 +0100 Subject: [PATCH 3/6] Add a ChangeLog entry for 87e44947a6 Ref: 87e44947a602ff1463cbdfd8a07e363fdc918a1b Signed-off-by: William Desportes --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 142c2fbea9..d6e0287f12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -62,6 +62,7 @@ phpMyAdmin - ChangeLog - issue #17606 Fix preview SQL modal not working inside "Add Index" modal - issue Fix PHP error on adding new column on create table form - issue #17482 Default to "Full texts" when running explain statements +- issue Fixed Chrome scrolling performance issue on a textarea of an "export as text" page 5.2.0 (2022-05-10) - issue #16521 Upgrade Bootstrap to version 5 From 45853b69b7c20e36531cf7a74eec64c434af4294 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sun, 20 Nov 2022 14:18:53 +0100 Subject: [PATCH 4/6] Fix #17902 - truncate "title" attribute of foreign keys BrowseForeigners::getDescriptionAndTitle() uses the same method Signed-off-by: William Desportes --- libraries/classes/Display/Results.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libraries/classes/Display/Results.php b/libraries/classes/Display/Results.php index 5d5bd51614..ded0a9cb89 100644 --- a/libraries/classes/Display/Results.php +++ b/libraries/classes/Display/Results.php @@ -4352,6 +4352,13 @@ class Results return __('Link not found!'); } + if ($dispval === null) { + return null; + } + + // Truncate values that are too long, see: #17902 + [,$dispval] = $this->getPartialText($dispval); + return $dispval; } From f3c4ef9bfa76724fb5ad6776d8bfd186a4063a07 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sun, 20 Nov 2022 15:03:44 +0100 Subject: [PATCH 5/6] Update broken link on config.default.php and fix a typo Signed-off-by: William Desportes --- libraries/config.default.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/config.default.php b/libraries/config.default.php index 0548896856..6be22a29af 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -189,7 +189,7 @@ $cfg['Servers'][$i]['ssl_ciphers'] = null; /** * MySQL 5.6 or later triggers the mysqlnd driver in PHP to validate the - * peer_name of the SSL certifcate + * peer_name of the SSL certificate * For most self-signed certificates this is a problem. Setting this to false * will disable the check and allow the connection (PHP 5.6.16 or later) * @@ -2857,7 +2857,7 @@ $cfg['CheckConfigurationPermissions'] = true; * is replaced by form with button. * This is required as some web servers (IIS) have problems with long URLs. * The recommended limit is 2000 - * (see https://www.boutell.com/newfaq/misc/urllength.html) but we put + * (see https://stackoverflow.com/a/417184/5155484) but we put * 1000 to accommodate Suhosin, see bug #3358750. */ $cfg['LinkLengthLimit'] = 1000; From c411d0fa4db3b83567672a55b886eedbb6670733 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sun, 20 Nov 2022 15:07:21 +0100 Subject: [PATCH 6/6] Update baselines Signed-off-by: William Desportes --- composer.json | 2 +- phpstan-baseline.neon | 196 +++++++++++++++++++--------- psalm-baseline.xml | 291 +++++++++++++++++++++++++----------------- 3 files changed, 309 insertions(+), 180 deletions(-) diff --git a/composer.json b/composer.json index 8d87107bb6..efe47b271a 100644 --- a/composer.json +++ b/composer.json @@ -61,7 +61,7 @@ "paragonie/sodium_compat": "^1.17", "phpmyadmin/motranslator": "^5.0", "phpmyadmin/shapefile": "^3.0.1", - "phpmyadmin/sql-parser": "dev-master#8fddb4becdfb657db3b9ade52e952ef3c822a26b", + "phpmyadmin/sql-parser": "dev-master#bb49d475e58b4082e63ed91a92ce955c9c20b058", "phpmyadmin/twig-i18n-extension": "^4.0", "psr/http-factory": "^1.0", "psr/http-message": "^1.0", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 0417e32b97..4fb89ae29c 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1496,9 +1496,9 @@ parameters: path: libraries/classes/Controllers/Table/ChangeController.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\SelectStatement\\:\\:\\$limit \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Limit\\) in empty\\(\\) is not falsy\\.$#" + message: "#^Parameter \\#2 \\$list of static method PhpMyAdmin\\\\SqlParser\\\\Utils\\\\Query\\:\\:replaceClauses\\(\\) expects PhpMyAdmin\\\\SqlParser\\\\TokensList, PhpMyAdmin\\\\SqlParser\\\\TokensList\\|null given\\.$#" count: 1 - path: libraries/classes/Controllers/Table/ChartController.php + path: libraries/classes/Controllers/Table/ExportController.php - message: "#^Method PhpMyAdmin\\\\Controllers\\\\Table\\\\FindReplaceController\\:\\:getRegexReplaceRows\\(\\) return type has no value type specified in iterable type array\\.$#" @@ -1621,7 +1621,12 @@ parameters: path: libraries/classes/Controllers/Table/Structure/PartitioningController.php - - message: "#^Offset 'partition_by' on array\\{partition_by\\: string, partition_expr\\: string, partition_count\\: int, subpartition_by\\: string, subpartition_expr\\: string, subpartition_count\\: int, can_have_subpartitions\\: bool\\} in isset\\(\\) always exists and is not nullable\\.$#" + message: "#^Offset 'partition_by' on array\\{partition_by\\: string, partition_expr\\: string, partition_count\\: mixed, subpartition_by\\: string, subpartition_expr\\: string, subpartition_count\\: int, can_have_subpartitions\\: bool\\} in isset\\(\\) always exists and is not nullable\\.$#" + count: 1 + path: libraries/classes/Controllers/Table/Structure/PartitioningController.php + + - + message: "#^Offset 0 does not exist on array\\\\|null\\.$#" count: 1 path: libraries/classes/Controllers/Table/Structure/PartitioningController.php @@ -1631,12 +1636,7 @@ parameters: path: libraries/classes/Controllers/Table/Structure/PartitioningController.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$partitionsNum \\(int\\) on left side of \\?\\? is not nullable\\.$#" - count: 1 - path: libraries/classes/Controllers/Table/Structure/PartitioningController.php - - - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$subpartitionsNum \\(int\\) on left side of \\?\\? is not nullable\\.$#" + message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, array\\\\|null given\\.$#" count: 1 path: libraries/classes/Controllers/Table/Structure/PartitioningController.php @@ -2385,6 +2385,36 @@ parameters: count: 1 path: libraries/classes/Database/Qbe.php + - + message: "#^Cannot access offset 'value' on mixed\\.$#" + count: 1 + path: libraries/classes/Database/Routines.php + + - + message: "#^Cannot access offset int\\<0, max\\> on array\\\\|int\\.$#" + count: 1 + path: libraries/classes/Database/Routines.php + + - + message: "#^Cannot access property \\$name on PhpMyAdmin\\\\SqlParser\\\\Components\\\\DataType\\|null\\.$#" + count: 1 + path: libraries/classes/Database/Routines.php + + - + message: "#^Cannot access property \\$options on PhpMyAdmin\\\\SqlParser\\\\Components\\\\DataType\\|null\\.$#" + count: 1 + path: libraries/classes/Database/Routines.php + + - + message: "#^Cannot access property \\$parameters on PhpMyAdmin\\\\SqlParser\\\\Components\\\\DataType\\|null\\.$#" + count: 1 + path: libraries/classes/Database/Routines.php + + - + message: "#^Cannot call method has\\(\\) on PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\|null\\.$#" + count: 1 + path: libraries/classes/Database/Routines.php + - message: "#^Method PhpMyAdmin\\\\Database\\\\Routines\\:\\:backupPrivileges\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 @@ -3170,6 +3200,11 @@ parameters: count: 1 path: libraries/classes/Display/Results.php + - + message: "#^Method PhpMyAdmin\\\\Display\\\\Results\\:\\:setConfigParamsForDisplayTable\\(\\) has parameter \\$analyzedSqlResults with no value type specified in iterable type array\\.$#" + count: 1 + path: libraries/classes/Display/Results.php + - message: "#^Method PhpMyAdmin\\\\Display\\\\Results\\:\\:setDisplayPartsAndTotal\\(\\) has parameter \\$displayParts with no value type specified in iterable type array\\.$#" count: 1 @@ -3250,6 +3285,11 @@ parameters: count: 1 path: libraries/classes/Display/Results.php + - + message: "#^Parameter \\#5 \\$sortExpressionNoDirection of method PhpMyAdmin\\\\Display\\\\Results\\:\\:getTableHeaders\\(\\) expects array\\, array\\ given\\.$#" + count: 1 + path: libraries/classes/Display/Results.php + - message: "#^Parameter \\#6 \\$colVisib of method PhpMyAdmin\\\\Display\\\\Results\\:\\:getRowValues\\(\\) expects array\\|bool\\|string, mixed given\\.$#" count: 1 @@ -3275,21 +3315,6 @@ parameters: count: 1 path: libraries/classes/Display/Results.php - - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\SelectStatement\\:\\:\\$limit \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Limit\\) in empty\\(\\) is not falsy\\.$#" - count: 1 - path: libraries/classes/Display/Results.php - - - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\SelectStatement\\:\\:\\$order \\(array\\\\) on left side of \\?\\? is not nullable\\.$#" - count: 1 - path: libraries/classes/Display/Results.php - - - - message: "#^Result of && is always false\\.$#" - count: 1 - path: libraries/classes/Display/Results.php - - message: "#^Method PhpMyAdmin\\\\Encoding\\:\\:convertString\\(\\) should return string but returns string\\|false\\.$#" count: 1 @@ -4541,13 +4566,13 @@ parameters: path: libraries/classes/Import/Ajax.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\DeleteStatement\\:\\:\\$limit \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Limit\\) in empty\\(\\) is not falsy\\.$#" + message: "#^Argument of an invalid type array\\\\|null supplied for foreach, only iterables are supported\\.$#" count: 1 path: libraries/classes/Import/SimulateDml.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\UpdateStatement\\:\\:\\$limit \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Limit\\) in empty\\(\\) is not falsy\\.$#" - count: 1 + message: "#^Parameter \\#2 \\$list of static method PhpMyAdmin\\\\SqlParser\\\\Utils\\\\Query\\:\\:getClause\\(\\) expects PhpMyAdmin\\\\SqlParser\\\\TokensList, PhpMyAdmin\\\\SqlParser\\\\TokensList\\|null given\\.$#" + count: 6 path: libraries/classes/Import/SimulateDml.php - @@ -5155,6 +5180,11 @@ parameters: count: 2 path: libraries/classes/LanguageManager.php + - + message: "#^Binary operation \"\\+\" between int\\|string\\|null and int\\<0, max\\> results in an error\\.$#" + count: 1 + path: libraries/classes/Linter.php + - message: "#^Method PhpMyAdmin\\\\Linter\\:\\:findLineNumberAndColumn\\(\\) has parameter \\$lines with no value type specified in iterable type array\\.$#" count: 1 @@ -5180,6 +5210,11 @@ parameters: count: 1 path: libraries/classes/Linter.php + - + message: "#^Parameter \\#2 \\$pos of static method PhpMyAdmin\\\\Linter\\:\\:findLineNumberAndColumn\\(\\) expects int, int\\|string\\|null given\\.$#" + count: 1 + path: libraries/classes/Linter.php + - message: "#^Right side of && is always true\\.$#" count: 1 @@ -5625,6 +5660,11 @@ parameters: count: 1 path: libraries/classes/ParseAnalyze.php + - + message: "#^Offset 'select_tables' on array\\{distinct\\?\\: bool, drop_database\\?\\: bool, group\\?\\: bool, having\\?\\: bool, is_affected\\?\\: bool, is_analyse\\?\\: bool, is_count\\?\\: bool, is_delete\\?\\: bool, \\.\\.\\.\\}&array\\{select_expr\\?\\: array\\, select_tables\\?\\: array\\, statement\\?\\: PhpMyAdmin\\\\SqlParser\\\\Statement\\|null, parser\\?\\: PhpMyAdmin\\\\SqlParser\\\\Parser\\} in empty\\(\\) does not exist\\.$#" + count: 1 + path: libraries/classes/ParseAnalyze.php + - message: "#^Method PhpMyAdmin\\\\Partitioning\\\\Maintenance\\:\\:analyze\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 @@ -5911,10 +5951,35 @@ parameters: path: libraries/classes/Plugins/Export/ExportPhparray.php - - message: "#^Binary operation \"\\.\" between 'FOREIGN KEY ' and array\\|string results in an error\\.$#" + message: "#^Binary operation \"\\.\" between 'FOREIGN KEY ' and array\\\\|string results in an error\\.$#" count: 1 path: libraries/classes/Plugins/Export/ExportSql.php + - + message: "#^Cannot access property \\$database on PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|null\\.$#" + count: 2 + path: libraries/classes/Plugins/Export/ExportSql.php + + - + message: "#^Cannot access property \\$expr on PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|null\\.$#" + count: 2 + path: libraries/classes/Plugins/Export/ExportSql.php + + - + message: "#^Cannot access property \\$table on PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|null\\.$#" + count: 5 + path: libraries/classes/Plugins/Export/ExportSql.php + + - + message: "#^Cannot call method has\\(\\) on PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\|null\\.$#" + count: 8 + path: libraries/classes/Plugins/Export/ExportSql.php + + - + message: "#^Cannot call method remove\\(\\) on PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\|null\\.$#" + count: 7 + path: libraries/classes/Plugins/Export/ExportSql.php + - message: "#^Method PhpMyAdmin\\\\Plugins\\\\Export\\\\ExportSql\\:\\:exportConfigurationMetadata\\(\\) has parameter \\$metadataTypes with no value type specified in iterable type array\\.$#" count: 1 @@ -5990,38 +6055,18 @@ parameters: count: 1 path: libraries/classes/Plugins/Export/ExportSql.php + - + message: "#^Parameter \\#1 \\$str of static method PhpMyAdmin\\\\SqlParser\\\\Context\\:\\:escape\\(\\) expects array\\\\|string, string\\|null given\\.$#" + count: 1 + path: libraries/classes/Plugins/Export/ExportSql.php + - message: "#^Parameter \\#2 \\$id of method PhpMyAdmin\\\\Plugins\\\\ExportPlugin\\:\\:getAlias\\(\\) expects string, mixed given\\.$#" count: 1 path: libraries/classes/Plugins/Export/ExportSql.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\CreateDefinition\\:\\:\\$key \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Key\\) in empty\\(\\) is not falsy\\.$#" - count: 3 - path: libraries/classes/Plugins/Export/ExportSql.php - - - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\CreateDefinition\\:\\:\\$options \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\) in empty\\(\\) is not falsy\\.$#" - count: 1 - path: libraries/classes/Plugins/Export/ExportSql.php - - - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\CreateDefinition\\:\\:\\$references \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Reference\\) in empty\\(\\) is not falsy\\.$#" - count: 1 - path: libraries/classes/Plugins/Export/ExportSql.php - - - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\CreateDefinition\\:\\:\\$type \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\DataType\\) in empty\\(\\) is not falsy\\.$#" - count: 1 - path: libraries/classes/Plugins/Export/ExportSql.php - - - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statements\\\\CreateStatement\\:\\:\\$entityOptions \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\) in empty\\(\\) is not falsy\\.$#" - count: 2 - path: libraries/classes/Plugins/Export/ExportSql.php - - - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Token\\:\\:\\$token \\(string\\) does not accept array\\|string\\.$#" + message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Token\\:\\:\\$token \\(string\\) does not accept array\\\\|string\\.$#" count: 1 path: libraries/classes/Plugins/Export/ExportSql.php @@ -8130,6 +8175,11 @@ parameters: count: 1 path: libraries/classes/SystemDatabase.php + - + message: "#^Argument of an invalid type array\\\\|null supplied for foreach, only iterables are supported\\.$#" + count: 2 + path: libraries/classes/Table.php + - message: "#^Cannot cast mixed to string\\.$#" count: 1 @@ -8335,6 +8385,11 @@ parameters: count: 1 path: libraries/classes/Table.php + - + message: "#^Parameter \\#1 \\$string of function substr expects string, mixed given\\.$#" + count: 2 + path: libraries/classes/Table.php + - message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#" count: 1 @@ -8350,11 +8405,6 @@ parameters: count: 1 path: libraries/classes/Table.php - - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\AlterOperation\\:\\:\\$field \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\) does not accept null\\.$#" - count: 2 - path: libraries/classes/Table.php - - message: "#^Property PhpMyAdmin\\\\Table\\:\\:\\$errors type has no value type specified in iterable type array\\.$#" count: 1 @@ -8471,7 +8521,22 @@ parameters: path: libraries/classes/ThemeManager.php - - message: "#^Cannot access property \\$table on PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|string\\.$#" + message: "#^Cannot access property \\$dest on PhpMyAdmin\\\\SqlParser\\\\Components\\\\IntoKeyword\\|null\\.$#" + count: 1 + path: libraries/classes/Tracker.php + + - + message: "#^Cannot access property \\$table on PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|null\\.$#" + count: 4 + path: libraries/classes/Tracker.php + + - + message: "#^Cannot access property \\$table on PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|string\\|null\\.$#" + count: 1 + path: libraries/classes/Tracker.php + + - + message: "#^Cannot access property \\$tokens on PhpMyAdmin\\\\SqlParser\\\\TokensList\\|null\\.$#" count: 1 path: libraries/classes/Tracker.php @@ -8491,12 +8556,17 @@ parameters: path: libraries/classes/Tracker.php - - message: "#^Parameter \\#3 \\$version of static method PhpMyAdmin\\\\Tracker\\:\\:deactivateTracking\\(\\) expects string, int given\\.$#" - count: 1 + message: "#^Offset 0 does not exist on array\\\\|null\\.$#" + count: 4 path: libraries/classes/Tracker.php - - message: "#^Property PhpMyAdmin\\\\SqlParser\\\\Statement\\:\\:\\$options \\(PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\) in isset\\(\\) is not nullable\\.$#" + message: "#^Offset 0 does not exist on array\\\\|null\\.$#" + count: 2 + path: libraries/classes/Tracker.php + + - + message: "#^Parameter \\#3 \\$version of static method PhpMyAdmin\\\\Tracker\\:\\:deactivateTracking\\(\\) expects string, int given\\.$#" count: 1 path: libraries/classes/Tracker.php diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 67911733ee..ae47a9bebc 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + global $route, $containerBuilder, $request; @@ -3066,9 +3066,6 @@ - - empty($statement->limit) - $rows $start @@ -3209,6 +3206,9 @@ $GLOBALS['single_table'] + + $parser->list + @@ -3869,20 +3869,22 @@ - - count($stmt->partitions) - count($stmt->partitions[0]->subpartitions) - $createTable $createTable - - $stmt->partitionsNum - $stmt->subpartitionsNum - + + $stmt->partitions + $stmt->partitions[0]->subpartitions + + + $stmt->partitions[0] + + + $stmt->partitions[0]->subpartitions + @@ -4504,8 +4506,7 @@ $post_key - - $_ENV[$var_name] + $_SERVER[$var_name] @@ -5379,15 +5380,13 @@ Util::getSupportedDatatypes() Util::getSupportedDatatypes() - + $options $options - $stmt->return->parameters $value - + $opt['value'] - $params['dir'][$i] $priv[0] $priv[1] $priv[2] @@ -5459,7 +5458,7 @@ $routine['item_param_type'][$i] $routine['item_param_type'][$routine['item_num_params'] - 1] - + $i $opt $options[] @@ -5467,14 +5466,6 @@ $retval['item_comment'] $retval['item_definer'] $retval['item_name'] - $retval['item_num_params'] - $retval['item_param_dir'] - $retval['item_param_length'] - $retval['item_param_length_arr'] - $retval['item_param_name'] - $retval['item_param_opts_num'] - $retval['item_param_opts_text'] - $retval['item_param_type'] $retval['item_sqldataaccess'] $retval['item_type'] $routine @@ -5548,6 +5539,9 @@ $itemType $itemType + + $params['dir'][$i] + $_GET['item_name'] $_GET['item_name'] @@ -5586,20 +5580,32 @@ $itemReturnType $itemSqlDataAccess - + $create_routine $mode $routine['item_name'] + $stmt->return->parameters $routine['item_name'] $routine['item_type'] + + $stmt->return->options->options + $output $this->browseRow($row) $title + + $stmt->return->name + $stmt->return->options + $stmt->return->parameters + + + has + @@ -6048,13 +6054,10 @@ - - $displayParts['nav_bar'] == '1' && $statement !== null && empty($statement->limit) - [] - - + $added[$orgFullTableName] $multiOrderUrlParams + $sortExpressionNoDirection $delUrlParams @@ -6191,7 +6194,7 @@ $rel['foreign_table'] $whereClauseMap[$rowNumber][$meta->orgtable] - + $_SESSION['tmpval']['display_binary'] $_SESSION['tmpval']['display_blob'] $_SESSION['tmpval']['geoOption'] @@ -6220,6 +6223,7 @@ $query['max_rows'] $query['pftext'] $query['pftext'] + $query['pftext'] $query['pos'] $query['pos'] $query['relational_display'] @@ -6266,7 +6270,7 @@ $row[$sortedColumnIndex] $row[$sortedColumnIndex] - + $_SESSION['tmpval']['geoOption'] $_SESSION['tmpval']['max_rows'] $_SESSION['tmpval']['pftext'] @@ -6285,6 +6289,7 @@ $firstShownRec $firstShownRec $firstShownRec + $fullText $hiddenFields['session_max_rows'] $i $i @@ -6375,8 +6380,9 @@ $firstStatement->order[$key] - + $dispval + $o->expr->expr (int) $GLOBALS['cfg']['LimitChars'] @@ -6391,8 +6397,7 @@ isset($sessionMaxRows) - - $firstStatement->order + isset($meta->internalMediaType) @@ -7794,7 +7799,7 @@ - + $active $additionalSql[$i] $additionalSql[$i] @@ -7814,7 +7819,6 @@ $size $size $sql_query - $table $table[self::COL_NAMES] $table[self::ROWS] $table[self::TBL_NAME] @@ -7872,7 +7876,7 @@ $typeArray[$analyses[$i][self::TYPES][$j]] - + $GLOBALS['offset'] $active $cellValue @@ -7897,7 +7901,6 @@ $sqlData['valid_sql'][] $sql_query $table - $table string|int @@ -7978,10 +7981,37 @@ - - $tableReferences - $tableReferences + + $set->value + + + $columns + + $columns[] + $set + + + $set->column + + + $set->column + $set->value + + + $parser->list + $parser->list + $parser->list + $parser->list + $parser->list + $parser->list + + + $statement->set + + + empty($diff) + @@ -8361,25 +8391,21 @@ - + $error[3] - $error[3] + mb_strlen((string) $error[2]) - - - $error[0] - $error[2] - $error[2] - $error[3] - $error[3] - - - $error + + $lineStart - - $error[3] + $lines[$line] + + $error[3] + + + $error[3] + @@ -9210,20 +9236,6 @@ $content - - - $analyzedSqlResults['select_tables'] - $db - - - $analyzedSqlResults['select_tables'][0] - $analyzedSqlResults['select_tables'][0] - - - $db - $table - - $row['Table'] @@ -9958,10 +9970,6 @@ - - empty($field->options) - empty($field->references) - $GLOBALS['asfile'] $GLOBALS['sql_if_not_exists'] @@ -10044,19 +10052,17 @@ $trigger['create'] $trigger['drop'] - + $aliases[$db]['tables'][$table]['columns'][$field] $aliases[$db]['tables'][$view]['columns'][$colAlias] - $aliases[$oldDatabase]['tables'][$refTable]['columns'][$column] $oneKey['ref_index_list'][$index] $values[$val] - + $colAlias $colAlias $colAlias $colAs - $column $columnAliases $definition $engine @@ -10122,22 +10128,48 @@ $tmpUniqueCondition $trigger['drop'] + + $field->references->columns + Context::escape($field->name) Context::escape($alias) - + $createQuery $dbi->getDefinition($db, $type, $routine) + $field->name $tableAlias $tableAlias $tableAlias + + $aliases[$oldDatabase]['tables'] + $eventDef + + $statement->name + $statement->name + $statement->name + $statement->table + $statement->table + + + $statement->name->table + $statement->table->table + + + has + has + remove + remove + remove + remove + $field->key->columns @@ -13369,6 +13401,9 @@ $numRows + + $statement->altered[0]->field->column + $result $row[0] @@ -13544,7 +13579,7 @@ $where $where - + $_SESSION['tmpval']['table_uiprefs'][$serverId][$this->dbName][$this->name] $column['Extra'] $column['Extra'] @@ -13570,7 +13605,6 @@ $index[0] $index[0] $masterField[$key] - $options['expr'] $row['Field'] $row['Field'] $row['Type'] @@ -13602,7 +13636,9 @@ $optionsArray[$existrelForeign[$masterFieldMd5]['on_delete'] ?? ''] $optionsArray[$existrelForeign[$masterFieldMd5]['on_update'] ?? ''] - + + $altered + $altered $cachedResult $cachedResult $column @@ -13630,7 +13666,6 @@ $oneField $oneField $oneField - $options $refDbName $ret[] $row @@ -13661,16 +13696,26 @@ string string - + exists exists exists exists + has + has $backquoted ? Util::backquote($column) : $column $index[0] + + $altered + $altered + + + $altered->options + $altered->options + $tableAutoIncrement ?? '' $tableCollation @@ -13681,9 +13726,11 @@ end($this->messages) json_decode($value, true) - + $_POST['constraint_name'][$masterFieldMd5] + $fields[$column]['expr'] $oldIndex + $options['expr'] $_POST['constraint_name'][$masterFieldMd5] @@ -13718,15 +13765,15 @@ $optionsArray $optionsArray + + $statement->altered + $statement->altered + $column->getSubPart() Generator::mysqlDie($tmpErrorCreate, $createQuery, false, '', false) Generator::mysqlDie($tmpErrorDrop, $dropQuery, false, '', false) - - null - null - $existrelForeign[$masterFieldMd5] $existrelForeign[$masterFieldMd5] @@ -13968,11 +14015,8 @@ - + '' - null - null - null (int) $version - 1 @@ -14008,10 +14052,6 @@ $data['username'] $result['identifier'] - - $tokens[0]->value - $tokens[2]->value - self::$trackingCache[$dbName][$tableName] @@ -14025,17 +14065,39 @@ $statement->body[4]->value $statement->into->dest->table + + $statement->fields[0] + $statement->fields[0] + $statement->from[0] + $statement->renames[0] + $statement->tables[0] + $tokens[0] + $tokens[2] + $statement + + $parser->list->tokens + $statement->fields[0]->table + $statement->fields[0]->table + $statement->from[0]->table + $statement->into->dest + $statement->renames[0]->new + $statement->renames[0]->old + $statement->table->table + $statement->table->table + $statement->table->table + $statement->table->table + $statement->tables[0]->table + $tokens[0]->value + $tokens[2]->value + (string) $version - + $dbname - $statement->name !== null - $statement->name !== null - isset($statement->options) @@ -15350,9 +15412,15 @@ - + + assertSame + + $actual $analyzedSqlResults + $analyzedSqlResults + $analyzedSqlResults + $analyzedSqlResults $analyzedSqlResults['is_analyse'] $analyzedSqlResults['is_count'] $analyzedSqlResults['is_explain'] @@ -15363,7 +15431,8 @@ $output $output - + + $_SESSION['tmpval']['pftext'] $analyzedSqlResults['is_analyse'] $analyzedSqlResults['is_count'] $analyzedSqlResults['is_explain'] @@ -16594,19 +16663,12 @@ $_SESSION['cache']['server_server'] $result[0] - - $keyword - $keyword - $_SESSION['cache']['server_server'] $_SESSION['cache']['server_server'] $_SESSION['cache']['server_server'] $_SESSION['cache']['server_server'] - - $type - array array @@ -16628,9 +16690,6 @@ array array - - $type - testBackquote testGetScriptNameForOption