From 0f3661f9085f3d0744fc1a25b045b349e8a49229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Wed, 29 May 2024 17:06:09 +0200 Subject: [PATCH 1/9] Keep empty cells at same height as others when browsing table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Krög --- themes/bootstrap/scss/_tables.scss | 9 +++++++++ themes/metro/scss/_tables.scss | 7 +++++++ themes/original/scss/_tables.scss | 7 +++++++ themes/pmahomme/scss/_tables.scss | 4 ++++ 4 files changed, 27 insertions(+) diff --git a/themes/bootstrap/scss/_tables.scss b/themes/bootstrap/scss/_tables.scss index 0a618658ea..03328354d8 100644 --- a/themes/bootstrap/scss/_tables.scss +++ b/themes/bootstrap/scss/_tables.scss @@ -1,3 +1,12 @@ +.table { + th, + td { + > span:empty::before { + content: "\200b"; + } + } +} + @media only screen and (min-width: 768px) { .table th.position-sticky { top: 96px; diff --git a/themes/metro/scss/_tables.scss b/themes/metro/scss/_tables.scss index 54cbf43fb8..872ffc39e1 100644 --- a/themes/metro/scss/_tables.scss +++ b/themes/metro/scss/_tables.scss @@ -17,6 +17,13 @@ } } + th, + td { + > span:empty::before { + content: "\200b"; + } + } + caption { font-family: $font-family-bold; background-color: $th-background; diff --git a/themes/original/scss/_tables.scss b/themes/original/scss/_tables.scss index a29155cdc5..3be5334a48 100644 --- a/themes/original/scss/_tables.scss +++ b/themes/original/scss/_tables.scss @@ -11,6 +11,13 @@ background-color: $th-background; } + th, + td { + > span:empty::before { + content: "\200b"; + } + } + thead th { border-bottom: 0; } diff --git a/themes/pmahomme/scss/_tables.scss b/themes/pmahomme/scss/_tables.scss index 24b9ce4401..86208176fd 100644 --- a/themes/pmahomme/scss/_tables.scss +++ b/themes/pmahomme/scss/_tables.scss @@ -5,6 +5,10 @@ td { text-shadow: 0 1px 0 #fff; vertical-align: middle; + + > span:empty::before { + content: "\200b"; + } } th { From fa14401e633c4b16a184473cc21ff10528cd69af Mon Sep 17 00:00:00 2001 From: Skully Date: Mon, 1 Jul 2024 21:05:20 +0100 Subject: [PATCH 2/9] safe parse JSON for current editing cell Signed-off-by: Skully --- js/src/makegrid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/makegrid.js b/js/src/makegrid.js index 662384d20c..4fb677d676 100644 --- a/js/src/makegrid.js +++ b/js/src/makegrid.js @@ -1522,7 +1522,7 @@ var makeGrid = function (t, enableResize, enableReorder, enableVisib, enableGrid isValueUpdated = thisFieldParams[fieldName] !== Functions.getCellValue(g.currentEditCell); } else { const JSONString = Functions.stringifyJSON(thisFieldParams[fieldName]); - isValueUpdated = JSONString !== JSON.stringify(JSON.parse(Functions.getCellValue(g.currentEditCell))); + isValueUpdated = JSONString !== Functions.stringifyJSON(Functions.getCellValue(g.currentEditCell)); } if (g.wasEditedCellNull || isValueUpdated) { From b9c793e7f85a159aab7f5dd168641360c8199f12 Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Tue, 23 Jul 2024 03:21:00 +0200 Subject: [PATCH 3/9] Show message if $total is greater than 0 Signed-off-by: Liviu-Mihail Concioiu --- libraries/classes/Display/Results.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/classes/Display/Results.php b/libraries/classes/Display/Results.php index 7d0dba63ed..dbfad9101e 100644 --- a/libraries/classes/Display/Results.php +++ b/libraries/classes/Display/Results.php @@ -3683,7 +3683,7 @@ class Results // 2.1 Prepares a messages with position information $sqlQueryMessage = ''; - if ($displayParts['query_stats'] == '1') { + if ($displayParts['query_stats'] == '1' && $total > 0) { $message = $this->setMessageInformation( $sortedColumnMessage, $analyzedSqlResults, From a5a3e94c9bc2fee377075e93f9082c5f9559350d Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Tue, 23 Jul 2024 04:16:23 +0200 Subject: [PATCH 4/9] Fix badges and urls Signed-off-by: Liviu-Mihail Concioiu --- README.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 660db29b5a..1948d348cf 100644 --- a/README.rst +++ b/README.rst @@ -8,13 +8,13 @@ https://www.phpmyadmin.net/ Code status ----------- -.. image:: https://github.com/phpmyadmin/phpmyadmin/workflows/Run%20tests/badge.svg?branch=master +.. image:: https://github.com/phpmyadmin/phpmyadmin/actions/workflows/tests.yml/badge.svg?branch=master :alt: Testsuite - :target: https://github.com/phpmyadmin/phpmyadmin/actions + :target: https://github.com/phpmyadmin/phpmyadmin/actions/workflows/tests.yml -.. image:: https://github.com/phpmyadmin/phpmyadmin/workflows/Run%20selenium%20tests/badge.svg?branch=master +.. image:: https://github.com/phpmyadmin/phpmyadmin/actions/workflows/test-selenium.yml/badge.svg?branch=master :alt: Selenium tests - :target: https://github.com/phpmyadmin/phpmyadmin/actions + :target: https://github.com/phpmyadmin/phpmyadmin/actions/workflows/test-selenium.yml .. image:: https://readthedocs.org/projects/phpmyadmin/badge/?version=latest :target: https://docs.phpmyadmin.net/en/latest/ @@ -40,7 +40,7 @@ Code status :alt: Type coverage :target: https://shepherd.dev/github/phpmyadmin/phpmyadmin -.. image:: https://badge.stryker-mutator.io/github.com/phpmyadmin/phpmyadmin/master +.. image:: https://img.shields.io/endpoint?url=https://badge-api.stryker-mutator.io/github.com/phpmyadmin/phpmyadmin/master :alt: Infection MSI :target: https://infection.github.io From 31222bb151e5e5b5a92ff1ea81c63c9e8016528c Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Tue, 23 Jul 2024 04:29:11 +0200 Subject: [PATCH 5/9] Fix to match master Signed-off-by: Liviu-Mihail Concioiu --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 1948d348cf..e0c8deb0be 100644 --- a/README.rst +++ b/README.rst @@ -10,11 +10,11 @@ Code status .. image:: https://github.com/phpmyadmin/phpmyadmin/actions/workflows/tests.yml/badge.svg?branch=master :alt: Testsuite - :target: https://github.com/phpmyadmin/phpmyadmin/actions/workflows/tests.yml + :target: https://github.com/phpmyadmin/phpmyadmin/actions/workflows/tests.yml?query=branch%3Amaster .. image:: https://github.com/phpmyadmin/phpmyadmin/actions/workflows/test-selenium.yml/badge.svg?branch=master - :alt: Selenium tests - :target: https://github.com/phpmyadmin/phpmyadmin/actions/workflows/test-selenium.yml + :alt: End-to-End tests + :target: https://github.com/phpmyadmin/phpmyadmin/actions/workflows/test-selenium.yml?query=branch%3Amaster .. image:: https://readthedocs.org/projects/phpmyadmin/badge/?version=latest :target: https://docs.phpmyadmin.net/en/latest/ From b7e9675a721b5f753ac12233c508988293e2a09f Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Tue, 23 Jul 2024 04:34:25 +0200 Subject: [PATCH 6/9] Fix documentation badge and url --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index e0c8deb0be..11e2df94c1 100644 --- a/README.rst +++ b/README.rst @@ -16,8 +16,8 @@ Code status :alt: End-to-End tests :target: https://github.com/phpmyadmin/phpmyadmin/actions/workflows/test-selenium.yml?query=branch%3Amaster -.. image:: https://readthedocs.org/projects/phpmyadmin/badge/?version=latest - :target: https://docs.phpmyadmin.net/en/latest/ +.. image:: https://readthedocs.org/projects/phpmyadmin/badge/?version=master + :target: https://docs.phpmyadmin.net/en/master/ :alt: Documentation build status .. image:: https://hosted.weblate.org/widgets/phpmyadmin/-/master/svg-badge.svg From d88632a027eb77128d5e3b151f2ddf847a955ab6 Mon Sep 17 00:00:00 2001 From: Moha684 Date: Fri, 26 Jul 2024 03:26:08 +0000 Subject: [PATCH 7/9] Translated using Weblate (Breton) Currently translated at 15.5% (532 of 3427 strings) [ci skip] Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/br/ Signed-off-by: Moha684 --- po/br.po | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/po/br.po b/po/br.po index 7497850ab7..625dd706b8 100644 --- a/po/br.po +++ b/po/br.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: phpMyAdmin 5.2.2-dev\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2023-11-12 15:23-0300\n" -"PO-Revision-Date: 2022-02-17 10:34+0000\n" -"Last-Translator: Maurício Meneghini Fauth \n" +"PO-Revision-Date: 2024-07-26 06:05+0000\n" +"Last-Translator: Moha684 \n" "Language-Team: Breton \n" "Language: br\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.11-dev\n" +"X-Generator: Weblate 5.7-dev\n" #: libraries/advisory_rules_generic.php:9 msgid "Uptime below one day" @@ -16149,10 +16149,8 @@ msgid "Protocol version:" msgstr "Stumm diwezhañ" #: templates/home/index.twig:183 -#, fuzzy -#| msgid "Username:" msgid "User:" -msgstr "Anv implijer :" +msgstr "Anv implijer:" #: templates/home/index.twig:187 #, fuzzy @@ -16165,48 +16163,44 @@ msgid "Web server" msgstr "" #: templates/home/index.twig:209 -#, fuzzy -#| msgid "Database comment" msgid "Database client version:" -msgstr "Evezhiadenn diwar-benn an diaz roadennoù : " +msgstr "Doare arval an diazoù roadennoù:" #: templates/home/index.twig:213 msgid "PHP extension:" -msgstr "" +msgstr "Astenn PHP:" #: templates/home/index.twig:220 -#, fuzzy -#| msgid "Versions" msgid "PHP version:" -msgstr "Stummoù" +msgstr "PHP darvez:" #: templates/home/index.twig:227 msgid "Show PHP information" -msgstr "" +msgstr "Diskouez an titouroù PHP" #: templates/home/index.twig:241 msgid "Version information:" -msgstr "" +msgstr "Stumm titouroù:" #: templates/home/index.twig:251 msgid "Official Homepage" -msgstr "" +msgstr "Pajenn degemer ofisiel" #: templates/home/index.twig:256 msgid "Contribute" -msgstr "" +msgstr "Kemer perzh" #: templates/home/index.twig:261 msgid "Get support" -msgstr "" +msgstr "Kaout skoazell" #: templates/home/index.twig:266 msgid "List of changes" -msgstr "" +msgstr "Roll ar c'hemmoù" #: templates/home/index.twig:271 templates/server/plugins/index.twig:30 msgid "License" -msgstr "" +msgstr "Aotreegezh" #: templates/home/index.twig:282 templates/setup/error.twig:2 msgid "Warning" From 6c7defbdec625499bd6f3d1e1ce6f6e4e29bb3c9 Mon Sep 17 00:00:00 2001 From: Moha684 Date: Thu, 1 Aug 2024 13:32:37 +0000 Subject: [PATCH 8/9] Translated using Weblate (Breton) Currently translated at 15.5% (534 of 3427 strings) [ci skip] Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/br/ Signed-off-by: Moha684 --- po/br.po | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/po/br.po b/po/br.po index 625dd706b8..fe44f867be 100644 --- a/po/br.po +++ b/po/br.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 5.2.2-dev\n" "Report-Msgid-Bugs-To: translators@phpmyadmin.net\n" "POT-Creation-Date: 2023-11-12 15:23-0300\n" -"PO-Revision-Date: 2024-07-26 06:05+0000\n" +"PO-Revision-Date: 2024-08-01 16:01+0000\n" "Last-Translator: Moha684 \n" "Language-Team: Breton \n" @@ -5398,12 +5398,19 @@ msgid "" "multibyte charset. Without the mbstring extension phpMyAdmin is unable to " "split strings correctly and it may result in unexpected results." msgstr "" +"N'eo ket bet kavet an astenn PHP mbstring ha war a seblant e vefe implijet " +"ur strobad arouezennoù liesokted. Hep an astenn-mañ n'hall ket phpMyAdmin " +"merañ mat an arouezennoù hag ar c'hudennoù dic'hortoz a c'hallfe " +"c'hoarvezout." #: libraries/classes/Controllers/HomeController.php:462 msgid "" "The curl extension was not found and allow_url_fopen is disabled. Due to " "this some features such as error reporting or version check are disabled." msgstr "" +"N'eo ket bet kavet an astenn curl ha allow_url_fopen zo diweredekaet. Neuze " +"e vez diweredekaet arc'hwelioù zo evel ar c'hodoù fazioù hag ar gwiriañ " +"stumm." #: libraries/classes/Controllers/Import/ImportController.php:109 #, fuzzy From 46f2c8871c20b8babf8b0e2d89dba7a83f31460a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Tue, 13 Aug 2024 20:13:18 -0300 Subject: [PATCH 9/9] Backport some fixes for PHPUnit 10 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1070623 Signed-off-by: Maurício Meneghini Fauth --- composer.json | 2 +- phpstan-baseline.neon | 30 ++++------ test/classes/AbstractTestCase.php | 21 ++----- test/classes/AdvisorTest.php | 4 +- test/classes/CacheTest.php | 2 +- test/classes/Charsets/CollationTest.php | 2 +- .../classes/Command/SetVersionCommandTest.php | 4 +- test/classes/Command/TwigLintCommandTest.php | 3 + .../Command/WriteGitRevisionCommandTest.php | 3 + test/classes/CommonTest.php | 2 +- test/classes/Config/DescriptionTest.php | 2 +- test/classes/Config/FormTest.php | 4 +- test/classes/Config/Forms/FormListTest.php | 2 +- test/classes/Config/Settings/ConsoleTest.php | 2 +- test/classes/Config/Settings/DebugTest.php | 2 +- test/classes/Config/Settings/ExportTest.php | 2 +- test/classes/Config/Settings/ImportTest.php | 2 +- test/classes/Config/Settings/SchemaTest.php | 2 +- test/classes/Config/Settings/ServerTest.php | 2 +- .../Config/Settings/SqlQueryBoxTest.php | 2 +- .../Config/Settings/TransformationsTest.php | 2 +- test/classes/Config/SettingsTest.php | 2 +- .../ConfigStorage/RelationCleanupTest.php | 8 +++ .../ConfigStorage/RelationParametersTest.php | 2 +- test/classes/ConfigStorage/RelationTest.php | 2 +- test/classes/ConfigStorage/UserGroupsTest.php | 2 + test/classes/ConfigTest.php | 17 +++--- .../Import/SimulateDmlControllerTest.php | 2 +- test/classes/CoreTest.php | 14 ++--- test/classes/CreateAddFieldTest.php | 8 +-- test/classes/Database/EventsTest.php | 10 ++-- test/classes/Database/RoutinesTest.php | 20 +++---- test/classes/Database/SearchTest.php | 2 +- test/classes/Database/TriggersTest.php | 10 ++-- test/classes/DatabaseInterfaceTest.php | 10 ++-- test/classes/Dbal/DatabaseNameTest.php | 2 +- test/classes/Dbal/DbiDummyTest.php | 4 +- test/classes/Dbal/TableNameTest.php | 2 +- test/classes/Dbal/WarningTest.php | 2 +- test/classes/Display/ResultsTest.php | 20 +++---- test/classes/Engines/PbxtTest.php | 2 +- test/classes/ErrorHandlerTest.php | 3 +- test/classes/ErrorReportTest.php | 2 +- test/classes/ErrorTest.php | 4 +- test/classes/FileTest.php | 2 +- test/classes/Gis/GisFactoryTest.php | 2 +- .../classes/Gis/GisGeometryCollectionTest.php | 14 ++--- test/classes/Gis/GisGeometryTest.php | 10 ++-- test/classes/Gis/GisLineStringTest.php | 12 ++-- test/classes/Gis/GisMultiLineStringTest.php | 12 ++-- test/classes/Gis/GisMultiPointTest.php | 12 ++-- test/classes/Gis/GisMultiPolygonTest.php | 22 +++---- test/classes/Gis/GisPointTest.php | 14 ++--- test/classes/Gis/GisPolygonTest.php | 28 ++++----- test/classes/HeaderTest.php | 2 +- test/classes/Html/GeneratorTest.php | 17 +++--- .../Http/Factory/ServerRequestFactoryTest.php | 5 +- test/classes/ImportTest.php | 14 ++--- test/classes/InsertEditTest.php | 4 +- test/classes/IpAllowDenyTest.php | 2 +- test/classes/LanguageTest.php | 4 +- test/classes/MessageTest.php | 8 +-- test/classes/MimeTest.php | 2 +- test/classes/Navigation/NodeFactoryTest.php | 2 + .../Navigation/Nodes/NodeTableTest.php | 2 +- test/classes/OperationsTest.php | 2 +- .../TablePartitionDefinitionTest.php | 4 +- .../Plugins/Auth/AuthenticationCookieTest.php | 19 +++++- .../Plugins/Auth/AuthenticationHttpTest.php | 14 ++++- test/classes/Plugins/Export/ExportOdsTest.php | 3 + test/classes/Plugins/Export/ExportOdtTest.php | 3 + test/classes/Plugins/Export/ExportSqlTest.php | 4 ++ .../Export/Helpers/TablePropertyTest.php | 8 +-- test/classes/Plugins/Import/ImportOdsTest.php | 2 +- .../TransformationPluginsTest.php | 4 +- test/classes/PluginsTest.php | 2 +- test/classes/Query/CompatibilityTest.php | 4 +- test/classes/SanitizeTest.php | 8 +-- .../Server/Privileges/AccountLockingTest.php | 12 ++++ test/classes/Server/PrivilegesTest.php | 13 ++-- test/classes/Server/SelectTest.php | 2 +- test/classes/Server/SysInfo/SysInfoTest.php | 2 +- test/classes/Setup/FormProcessingTest.php | 2 + test/classes/SqlTest.php | 2 +- test/classes/StorageEngineTest.php | 2 +- test/classes/Table/ColumnsDefinitionTest.php | 2 +- .../classes/Table/Maintenance/MessageTest.php | 2 +- test/classes/TableTest.php | 2 +- test/classes/TemplateTest.php | 8 +-- test/classes/ThemeTest.php | 2 +- test/classes/TrackerTest.php | 8 ++- test/classes/TransformationsTest.php | 8 +-- test/classes/TypesByDatabaseVersionTest.php | 8 +-- test/classes/TypesTest.php | 10 ++-- test/classes/UrlTest.php | 4 +- test/classes/UserPasswordTest.php | 2 +- test/classes/UtilTest.php | 60 +++++++++++-------- test/classes/Utils/ForeignKeyTest.php | 6 +- test/classes/Utils/FormatConverterTest.php | 8 +-- test/classes/Utils/GisTest.php | 2 +- test/classes/Utils/HttpRequestTest.php | 2 +- test/classes/VersionInformationTest.php | 11 +++- test/classes/WebAuthn/CBORDecoderTest.php | 4 +- test/classes/ZipExtensionTest.php | 4 +- test/selenium/ExportTest.php | 2 +- 105 files changed, 391 insertions(+), 313 deletions(-) diff --git a/composer.json b/composer.json index 8bca1b16a8..7c4480773b 100644 --- a/composer.json +++ b/composer.json @@ -106,7 +106,7 @@ "phpstan/phpstan": "^1.4.8", "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-webmozart-assert": "^1.0", - "phpunit/phpunit": "^8.5.16 || ^9.5", + "phpunit/phpunit": "^8.5.16 || ^9.6", "pragmarx/google2fa-qrcode": "^2.1", "psalm/plugin-phpunit": "^0.16.1", "roave/security-advisories": "dev-latest", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 29a533b2ba..53421a4d9a 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1940,11 +1940,6 @@ parameters: count: 1 path: libraries/classes/Database/CentralColumns.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: libraries/classes/Database/CentralColumns.php - - message: "#^Method PhpMyAdmin\\\\Database\\\\Designer\\:\\:getDatabaseTables\\(\\) has parameter \\$tab_column with no value type specified in iterable type array\\.$#" count: 1 @@ -2930,11 +2925,21 @@ parameters: count: 1 path: libraries/classes/Dbal/DbiMysqli.php + - + message: "#^Method PhpMyAdmin\\\\Dbal\\\\MysqliResult\\:\\:fetchAllAssoc\\(\\) should return array\\\\> but returns array\\, array\\\\>\\.$#" + count: 1 + path: libraries/classes/Dbal/MysqliResult.php + - message: "#^Method PhpMyAdmin\\\\Dbal\\\\MysqliResult\\:\\:fetchAllKeyPair\\(\\) should return array\\ but returns array\\\\.$#" count: 1 path: libraries/classes/Dbal/MysqliResult.php + - + message: "#^Method PhpMyAdmin\\\\Dbal\\\\MysqliResult\\:\\:fetchAssoc\\(\\) should return array\\ but returns array\\\\.$#" + count: 1 + path: libraries/classes/Dbal/MysqliResult.php + - message: "#^Cannot access offset int\\<0, max\\> on mixed\\.$#" count: 2 @@ -5365,11 +5370,6 @@ parameters: count: 1 path: libraries/classes/Navigation/NavigationTree.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 1 - path: libraries/classes/Navigation/NavigationTree.php - - message: "#^Method PhpMyAdmin\\\\Navigation\\\\NodeFactory\\:\\:getInstance\\(\\) has parameter \\$name with no value type specified in iterable type array\\.$#" count: 1 @@ -5730,11 +5730,6 @@ parameters: count: 1 path: libraries/classes/Pdf.php - - - message: "#^Left side of \\|\\| is always false\\.$#" - count: 1 - path: libraries/classes/Plugins.php - - message: "#^Method PhpMyAdmin\\\\Plugins\\:\\:getExport\\(\\) should return array\\ but returns array\\\\.$#" count: 1 @@ -5755,11 +5750,6 @@ parameters: count: 1 path: libraries/classes/Plugins.php - - - message: "#^Right side of \\|\\| is always false\\.$#" - count: 3 - path: libraries/classes/Plugins.php - - message: "#^Parameter \\#2 \\$remoteIp of method ReCaptcha\\\\ReCaptcha\\:\\:verify\\(\\) expects string\\|null, bool\\|string given\\.$#" count: 1 diff --git a/test/classes/AbstractTestCase.php b/test/classes/AbstractTestCase.php index 5d5a5fc99e..ef7047b3b7 100644 --- a/test/classes/AbstractTestCase.php +++ b/test/classes/AbstractTestCase.php @@ -131,8 +131,11 @@ abstract class AbstractTestCase extends TestCase /** * PHPUnit 8 compatibility */ - public static function assertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void - { + public static function assertMatchesRegularExpressionCompat( + string $pattern, + string $string, + string $message = '' + ): void { if (method_exists(TestCase::class, 'assertMatchesRegularExpression')) { /** @phpstan-ignore-next-line */ parent::assertMatchesRegularExpression($pattern, $string, $message); @@ -142,20 +145,6 @@ abstract class AbstractTestCase extends TestCase } } - /** - * PHPUnit 8 compatibility - */ - public static function assertFileDoesNotExist(string $filename, string $message = ''): void - { - if (method_exists(TestCase::class, 'assertFileDoesNotExist')) { - /** @phpstan-ignore-next-line */ - parent::assertFileDoesNotExist($filename, $message); - } else { - /** @psalm-suppress DeprecatedMethod */ - parent::assertFileNotExists($filename, $message); - } - } - protected function loadContainerBuilder(): void { global $containerBuilder; diff --git a/test/classes/AdvisorTest.php b/test/classes/AdvisorTest.php index 81c245933c..35b3171bc0 100644 --- a/test/classes/AdvisorTest.php +++ b/test/classes/AdvisorTest.php @@ -33,7 +33,7 @@ class AdvisorTest extends AbstractTestCase $this->assertEquals($expected, $result); } - public function advisorTimes(): array + public static function advisorTimes(): array { return [ [ @@ -90,7 +90,7 @@ class AdvisorTest extends AbstractTestCase $this->assertEquals([$expected], $runResult['fired']); } - public function rulesProvider(): array + public static function rulesProvider(): array { return [ [ diff --git a/test/classes/CacheTest.php b/test/classes/CacheTest.php index 5759592bf3..39be97aa7a 100644 --- a/test/classes/CacheTest.php +++ b/test/classes/CacheTest.php @@ -20,7 +20,7 @@ class CacheTest extends AbstractTestCase /** * @return array[] */ - public function dataProviderCacheKeyValues(): array + public static function dataProviderCacheKeyValues(): array { return [ 'normal key and false value' => [ diff --git a/test/classes/Charsets/CollationTest.php b/test/classes/Charsets/CollationTest.php index e161410965..aeee685a41 100644 --- a/test/classes/Charsets/CollationTest.php +++ b/test/classes/Charsets/CollationTest.php @@ -54,7 +54,7 @@ class CollationTest extends AbstractTestCase /** * @return array */ - public function providerTestBuildDescription(): array + public static function providerTestBuildDescription(): array { return [ [ diff --git a/test/classes/Command/SetVersionCommandTest.php b/test/classes/Command/SetVersionCommandTest.php index 68589fc0f2..a6c0da09d8 100644 --- a/test/classes/Command/SetVersionCommandTest.php +++ b/test/classes/Command/SetVersionCommandTest.php @@ -32,7 +32,7 @@ class SetVersionCommandTest extends AbstractTestCase /** * @return array[] */ - public function dataProviderBadVersions(): array + public static function dataProviderBadVersions(): array { return [ [''], @@ -76,7 +76,7 @@ class SetVersionCommandTest extends AbstractTestCase /** * @return array[] */ - public function dataProviderGoodVersions(): array + public static function dataProviderGoodVersions(): array { return [ [ diff --git a/test/classes/Command/TwigLintCommandTest.php b/test/classes/Command/TwigLintCommandTest.php index 5caf77a656..326047fc3c 100644 --- a/test/classes/Command/TwigLintCommandTest.php +++ b/test/classes/Command/TwigLintCommandTest.php @@ -98,6 +98,9 @@ class TwigLintCommandTest extends AbstractTestCase ], $filesInfos); } + /** + * @requires PHPUnit < 10 + */ public function testGetFilesInfoInvalidFile(): void { $command = $this->getMockBuilder(TwigLintCommand::class) diff --git a/test/classes/Command/WriteGitRevisionCommandTest.php b/test/classes/Command/WriteGitRevisionCommandTest.php index f4f2674441..f3d11277d1 100644 --- a/test/classes/Command/WriteGitRevisionCommandTest.php +++ b/test/classes/Command/WriteGitRevisionCommandTest.php @@ -19,6 +19,9 @@ class WriteGitRevisionCommandTest extends AbstractTestCase /** @var WriteGitRevisionCommand */ private $command; + /** + * @requires PHPUnit < 10 + */ public function testGetGeneratedClassValidVersion(): void { if (! class_exists(Command::class)) { diff --git a/test/classes/CommonTest.php b/test/classes/CommonTest.php index 83c05cfae1..e4633ccc7a 100644 --- a/test/classes/CommonTest.php +++ b/test/classes/CommonTest.php @@ -28,7 +28,7 @@ class CommonTest extends AbstractTestCase $this->assertEquals($expected, $GLOBALS['PMA_PHP_SELF']); } - public function providerForTestCleanupPathInfo(): array + public static function providerForTestCleanupPathInfo(): array { return [ [ diff --git a/test/classes/Config/DescriptionTest.php b/test/classes/Config/DescriptionTest.php index b9e36c3abc..400d7a4c9a 100644 --- a/test/classes/Config/DescriptionTest.php +++ b/test/classes/Config/DescriptionTest.php @@ -40,7 +40,7 @@ class DescriptionTest extends AbstractTestCase /** * @return array */ - public function getValues(): array + public static function getValues(): array { return [ [ diff --git a/test/classes/Config/FormTest.php b/test/classes/Config/FormTest.php index c7647d2c8d..b0898321ee 100644 --- a/test/classes/Config/FormTest.php +++ b/test/classes/Config/FormTest.php @@ -150,7 +150,7 @@ class FormTest extends AbstractTestCase $this->assertIsString($result[1]); // needs regexp because the counter is static - $this->assertMatchesRegularExpression('/^preffoo\/foo\/bar\/\:group\:end\:\d+$/', $result[1]); + $this->assertMatchesRegularExpressionCompat('/^preffoo\/foo\/bar\/\:group\:end\:\d+$/', $result[1]); } /** @@ -186,7 +186,7 @@ class FormTest extends AbstractTestCase $keys = array_keys($result); $key = $keys[0]; $this->assertIsString($key); - $this->assertMatchesRegularExpression('/^\:group\:end\:(\d+)$/', $key); + $this->assertMatchesRegularExpressionCompat('/^\:group\:end\:(\d+)$/', $key); preg_match('/^\:group\:end\:(\d+)$/', $key, $matches); $digit = $matches[1]; diff --git a/test/classes/Config/Forms/FormListTest.php b/test/classes/Config/Forms/FormListTest.php index a25c8d534e..636e71dbb5 100644 --- a/test/classes/Config/Forms/FormListTest.php +++ b/test/classes/Config/Forms/FormListTest.php @@ -65,7 +65,7 @@ class FormListTest extends AbstractTestCase * @return string[][] * @psalm-return array{array{class-string, class-string}} */ - public function formObjects(): array + public static function formObjects(): array { return [ [User\UserFormList::class, User\ExportForm::class], diff --git a/test/classes/Config/Settings/ConsoleTest.php b/test/classes/Config/Settings/ConsoleTest.php index b49fdeccea..18950ea8c2 100644 --- a/test/classes/Config/Settings/ConsoleTest.php +++ b/test/classes/Config/Settings/ConsoleTest.php @@ -59,7 +59,7 @@ class ConsoleTest extends TestCase * @return mixed[][][][] * @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][] */ - public function providerForTestConstructor(): array + public static function providerForTestConstructor(): array { return [ 'null values' => [ diff --git a/test/classes/Config/Settings/DebugTest.php b/test/classes/Config/Settings/DebugTest.php index af76587e16..2d373a7c43 100644 --- a/test/classes/Config/Settings/DebugTest.php +++ b/test/classes/Config/Settings/DebugTest.php @@ -48,7 +48,7 @@ class DebugTest extends TestCase * @return mixed[][][][] * @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][] */ - public function providerForTestConstructor(): array + public static function providerForTestConstructor(): array { return [ 'null values' => [ diff --git a/test/classes/Config/Settings/ExportTest.php b/test/classes/Config/Settings/ExportTest.php index e8557cec6d..4ab30cf08c 100644 --- a/test/classes/Config/Settings/ExportTest.php +++ b/test/classes/Config/Settings/ExportTest.php @@ -157,7 +157,7 @@ class ExportTest extends TestCase * @return mixed[][][][] * @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][] */ - public function providerForTestConstructor(): array + public static function providerForTestConstructor(): array { return [ 'null values' => [ diff --git a/test/classes/Config/Settings/ImportTest.php b/test/classes/Config/Settings/ImportTest.php index 068ccfb8ed..035fb687eb 100644 --- a/test/classes/Config/Settings/ImportTest.php +++ b/test/classes/Config/Settings/ImportTest.php @@ -76,7 +76,7 @@ class ImportTest extends TestCase * @return mixed[][][][] * @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][] */ - public function providerForTestConstructor(): array + public static function providerForTestConstructor(): array { return [ 'null values' => [ diff --git a/test/classes/Config/Settings/SchemaTest.php b/test/classes/Config/Settings/SchemaTest.php index 86dc573545..c812c4f511 100644 --- a/test/classes/Config/Settings/SchemaTest.php +++ b/test/classes/Config/Settings/SchemaTest.php @@ -69,7 +69,7 @@ class SchemaTest extends TestCase * @return mixed[][][][] * @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][] */ - public function providerForTestConstructor(): array + public static function providerForTestConstructor(): array { return [ 'null values' => [ diff --git a/test/classes/Config/Settings/ServerTest.php b/test/classes/Config/Settings/ServerTest.php index f33d598ef4..bef654ab20 100644 --- a/test/classes/Config/Settings/ServerTest.php +++ b/test/classes/Config/Settings/ServerTest.php @@ -110,7 +110,7 @@ class ServerTest extends TestCase * @return mixed[][][][] * @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][] */ - public function providerForTestConstructor(): array + public static function providerForTestConstructor(): array { return [ 'null values' => [ diff --git a/test/classes/Config/Settings/SqlQueryBoxTest.php b/test/classes/Config/Settings/SqlQueryBoxTest.php index f7e0ee2b9f..97438aa65c 100644 --- a/test/classes/Config/Settings/SqlQueryBoxTest.php +++ b/test/classes/Config/Settings/SqlQueryBoxTest.php @@ -48,7 +48,7 @@ class SqlQueryBoxTest extends TestCase * @return mixed[][][][] * @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][] */ - public function providerForTestConstructor(): array + public static function providerForTestConstructor(): array { return [ 'null values' => [ diff --git a/test/classes/Config/Settings/TransformationsTest.php b/test/classes/Config/Settings/TransformationsTest.php index b866601b07..7113360636 100644 --- a/test/classes/Config/Settings/TransformationsTest.php +++ b/test/classes/Config/Settings/TransformationsTest.php @@ -60,7 +60,7 @@ class TransformationsTest extends TestCase * @return mixed[][][][] * @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][] */ - public function providerForTestConstructor(): array + public static function providerForTestConstructor(): array { return [ 'null values' => [ diff --git a/test/classes/Config/SettingsTest.php b/test/classes/Config/SettingsTest.php index 5ed9e0a260..7a1e567ac6 100644 --- a/test/classes/Config/SettingsTest.php +++ b/test/classes/Config/SettingsTest.php @@ -372,7 +372,7 @@ class SettingsTest extends TestCase * @return mixed[][][][] * @psalm-return (array{0: string, 1: mixed, 2: mixed})[][][] */ - public function providerForTestConstructor(): array + public static function providerForTestConstructor(): array { return [ 'null values' => [ diff --git a/test/classes/ConfigStorage/RelationCleanupTest.php b/test/classes/ConfigStorage/RelationCleanupTest.php index 1a795a2ffb..c57c7a8a22 100644 --- a/test/classes/ConfigStorage/RelationCleanupTest.php +++ b/test/classes/ConfigStorage/RelationCleanupTest.php @@ -57,6 +57,8 @@ class RelationCleanupTest extends AbstractTestCase /** * Test for column method + * + * @requires PHPUnit < 10 */ public function testColumnWithRelations(): void { @@ -117,6 +119,8 @@ class RelationCleanupTest extends AbstractTestCase /** * Test for table method + * + * @requires PHPUnit < 10 */ public function testTableWithRelations(): void { @@ -196,6 +200,8 @@ class RelationCleanupTest extends AbstractTestCase /** * Test for database method + * + * @requires PHPUnit < 10 */ public function testDatabaseWithRelations(): void { @@ -256,6 +262,8 @@ class RelationCleanupTest extends AbstractTestCase /** * Test for user method + * + * @requires PHPUnit < 10 */ public function testUserWithRelations(): void { diff --git a/test/classes/ConfigStorage/RelationParametersTest.php b/test/classes/ConfigStorage/RelationParametersTest.php index 71038c4200..a6c0ebd7aa 100644 --- a/test/classes/ConfigStorage/RelationParametersTest.php +++ b/test/classes/ConfigStorage/RelationParametersTest.php @@ -257,7 +257,7 @@ class RelationParametersTest extends TestCase /** * @return array>> */ - public function providerForTestToArray(): array + public static function providerForTestToArray(): array { return [ 'default values' => [ diff --git a/test/classes/ConfigStorage/RelationTest.php b/test/classes/ConfigStorage/RelationTest.php index b202f374b5..d7e4bb15dd 100644 --- a/test/classes/ConfigStorage/RelationTest.php +++ b/test/classes/ConfigStorage/RelationTest.php @@ -2217,7 +2217,7 @@ class RelationTest extends AbstractTestCase * @return array>> * @psalm-return list, string[]}> */ - public function providerForTestRenameTable(): array + public static function providerForTestRenameTable(): array { // phpcs:disable Generic.Files.LineLength.TooLong return [ diff --git a/test/classes/ConfigStorage/UserGroupsTest.php b/test/classes/ConfigStorage/UserGroupsTest.php index b733e35439..5b6432c94f 100644 --- a/test/classes/ConfigStorage/UserGroupsTest.php +++ b/test/classes/ConfigStorage/UserGroupsTest.php @@ -90,6 +90,8 @@ class UserGroupsTest extends AbstractTestCase /** * Tests UserGroups::delete() function + * + * @requires PHPUnit < 10 */ public function testDeleteUserGroup(): void { diff --git a/test/classes/ConfigTest.php b/test/classes/ConfigTest.php index ac82d418e0..fe2e31d2c5 100644 --- a/test/classes/ConfigTest.php +++ b/test/classes/ConfigTest.php @@ -230,7 +230,7 @@ class ConfigTest extends AbstractTestCase * * @return array */ - public function userAgentProvider(): array + public static function userAgentProvider(): array { return [ [ @@ -415,7 +415,7 @@ class ConfigTest extends AbstractTestCase * * @return array */ - public function serverNames(): array + public static function serverNames(): array { return [ [ @@ -577,7 +577,7 @@ class ConfigTest extends AbstractTestCase * * @return array */ - public function httpsParams(): array + public static function httpsParams(): array { return [ [ @@ -812,7 +812,7 @@ class ConfigTest extends AbstractTestCase * * @return array data for testGetRootPath */ - public function rootUris(): array + public static function rootUris(): array { return [ [ @@ -920,7 +920,7 @@ class ConfigTest extends AbstractTestCase * * @return array */ - public function configPaths(): array + public static function configPaths(): array { return [ [ @@ -1090,7 +1090,7 @@ class ConfigTest extends AbstractTestCase * * @return array */ - public function serverSettingsProvider(): array + public static function serverSettingsProvider(): array { return [ 'empty' => [ @@ -1113,6 +1113,7 @@ class ConfigTest extends AbstractTestCase /** * @group with-trigger-error + * @requires PHPUnit < 10 */ public function testCheckServersWithInvalidServer(): void { @@ -1149,7 +1150,7 @@ class ConfigTest extends AbstractTestCase * * @return array */ - public function selectServerProvider(): array + public static function selectServerProvider(): array { return [ 'zero' => [ @@ -1222,7 +1223,7 @@ class ConfigTest extends AbstractTestCase * * @return array */ - public function connectionParams(): array + public static function connectionParams(): array { $cfg_basic = [ 'user' => 'u', diff --git a/test/classes/Controllers/Import/SimulateDmlControllerTest.php b/test/classes/Controllers/Import/SimulateDmlControllerTest.php index 3459ed5ea4..ac73c64e7c 100644 --- a/test/classes/Controllers/Import/SimulateDmlControllerTest.php +++ b/test/classes/Controllers/Import/SimulateDmlControllerTest.php @@ -95,7 +95,7 @@ class SimulateDmlControllerTest extends AbstractTestCase * } * > */ - public function providerForTestGetMatchedRows(): array + public static function providerForTestGetMatchedRows(): array { // Data from table: // CREATE TABLE `t` AS diff --git a/test/classes/CoreTest.php b/test/classes/CoreTest.php index d60623bd1f..e58b3b6726 100644 --- a/test/classes/CoreTest.php +++ b/test/classes/CoreTest.php @@ -311,7 +311,7 @@ class CoreTest extends AbstractNetworkTestCase * * @return array */ - public function providerTestGotoNowhere(): array + public static function providerTestGotoNowhere(): array { return [ [ @@ -421,7 +421,7 @@ class CoreTest extends AbstractNetworkTestCase * * @return array */ - public function providerTestGetRealSize(): array + public static function providerTestGetRealSize(): array { return [ [ @@ -506,7 +506,7 @@ class CoreTest extends AbstractNetworkTestCase * * @return array */ - public function providerTestLinkURL(): array + public static function providerTestLinkURL(): array { return [ [ @@ -625,7 +625,7 @@ class CoreTest extends AbstractNetworkTestCase * * @return array */ - public function provideTestIsAllowedDomain(): array + public static function provideTestIsAllowedDomain(): array { return [ [ @@ -684,7 +684,7 @@ class CoreTest extends AbstractNetworkTestCase * * @return array */ - public function provideTestSafeUnserialize(): array + public static function provideTestSafeUnserialize(): array { return [ [ @@ -756,7 +756,7 @@ class CoreTest extends AbstractNetworkTestCase * * @return array */ - public function provideTestSanitizeMySQLHost(): array + public static function provideTestSanitizeMySQLHost(): array { return [ [ @@ -989,7 +989,7 @@ class CoreTest extends AbstractNetworkTestCase /** * @return array>> */ - public function providerForTestPopulateRequestWithEncryptedQueryParamsWithInvalidParam(): array + public static function providerForTestPopulateRequestWithEncryptedQueryParamsWithInvalidParam(): array { return [ [[], []], diff --git a/test/classes/CreateAddFieldTest.php b/test/classes/CreateAddFieldTest.php index 470e8c3125..29c19546ac 100644 --- a/test/classes/CreateAddFieldTest.php +++ b/test/classes/CreateAddFieldTest.php @@ -45,7 +45,7 @@ class CreateAddFieldTest extends AbstractTestCase * * @return array */ - public function providerGetPartitionsDefinition(): array + public static function providerGetPartitionsDefinition(): array { return [ [ @@ -246,7 +246,7 @@ class CreateAddFieldTest extends AbstractTestCase * * @return array */ - public function providerGetTableCreationQuery(): array + public static function providerGetTableCreationQuery(): array { return [ [ @@ -319,7 +319,7 @@ class CreateAddFieldTest extends AbstractTestCase * * @return array */ - public function providerGetNumberOfFieldsFromRequest(): array + public static function providerGetNumberOfFieldsFromRequest(): array { return [ [ @@ -334,7 +334,7 @@ class CreateAddFieldTest extends AbstractTestCase * * @return array[] */ - public function providerGetColumnCreationQueryRequest(): array + public static function providerGetColumnCreationQueryRequest(): array { return [ [ diff --git a/test/classes/Database/EventsTest.php b/test/classes/Database/EventsTest.php index 7bcb60d567..3f1b7623e0 100644 --- a/test/classes/Database/EventsTest.php +++ b/test/classes/Database/EventsTest.php @@ -68,7 +68,7 @@ class EventsTest extends AbstractTestCase * * @return array */ - public function providerGetDataFromRequest(): array + public static function providerGetDataFromRequest(): array { return [ [ @@ -162,7 +162,7 @@ class EventsTest extends AbstractTestCase * * @return array */ - public function providerGetEditorFormAdd(): array + public static function providerGetEditorFormAdd(): array { $data = [ 'item_name' => '', @@ -217,7 +217,7 @@ class EventsTest extends AbstractTestCase * * @return array */ - public function providerGetEditorFormEdit(): array + public static function providerGetEditorFormEdit(): array { $data = [ 'item_name' => 'foo', @@ -273,7 +273,7 @@ class EventsTest extends AbstractTestCase * * @return array */ - public function providerGetEditorFormAjax(): array + public static function providerGetEditorFormAjax(): array { $data = [ 'item_name' => '', @@ -334,7 +334,7 @@ class EventsTest extends AbstractTestCase * * @return array */ - public function providerGetQueryFromRequest(): array + public static function providerGetQueryFromRequest(): array { return [ // Testing success diff --git a/test/classes/Database/RoutinesTest.php b/test/classes/Database/RoutinesTest.php index 1d5cccbad3..d72fbc3aa8 100644 --- a/test/classes/Database/RoutinesTest.php +++ b/test/classes/Database/RoutinesTest.php @@ -74,7 +74,7 @@ class RoutinesTest extends AbstractTestCase * * @return array */ - public function providerGetDataFromRequest(): array + public static function providerGetDataFromRequest(): array { return [ [ @@ -328,7 +328,7 @@ class RoutinesTest extends AbstractTestCase * * @return array */ - public function providerGetParameterRow(): array + public static function providerGetParameterRow(): array { $data = [ 'item_name' => '', @@ -408,7 +408,7 @@ class RoutinesTest extends AbstractTestCase * * @return array */ - public function providerGetParameterRowAjax(): array + public static function providerGetParameterRowAjax(): array { $data = [ 'item_name' => '', @@ -481,7 +481,7 @@ class RoutinesTest extends AbstractTestCase * * @return array */ - public function providerGetEditorForm1(): array + public static function providerGetEditorForm1(): array { $data = [ 'item_name' => '', @@ -598,7 +598,7 @@ class RoutinesTest extends AbstractTestCase * * @return array */ - public function providerGetEditorForm2(): array + public static function providerGetEditorForm2(): array { $data = [ 'item_name' => 'foo', @@ -717,7 +717,7 @@ class RoutinesTest extends AbstractTestCase * * @return array */ - public function providerGetEditorForm3(): array + public static function providerGetEditorForm3(): array { $data = [ 'item_name' => 'foo', @@ -830,7 +830,7 @@ class RoutinesTest extends AbstractTestCase * * @return array */ - public function providerGetEditorForm4(): array + public static function providerGetEditorForm4(): array { $data = [ 'item_name' => 'foo', @@ -888,7 +888,7 @@ class RoutinesTest extends AbstractTestCase * * @return array */ - public function providerGetExecuteForm1(): array + public static function providerGetExecuteForm1(): array { $data = [ 'item_name' => 'foo', @@ -1031,7 +1031,7 @@ class RoutinesTest extends AbstractTestCase * * @return array */ - public function providerGetExecuteForm2(): array + public static function providerGetExecuteForm2(): array { $data = [ 'item_name' => 'foo', @@ -1195,7 +1195,7 @@ class RoutinesTest extends AbstractTestCase * * @return array */ - public function providerGetQueryFromRequest(): array + public static function providerGetQueryFromRequest(): array { return [ // Testing success diff --git a/test/classes/Database/SearchTest.php b/test/classes/Database/SearchTest.php index 808c5b9fad..965477a585 100644 --- a/test/classes/Database/SearchTest.php +++ b/test/classes/Database/SearchTest.php @@ -90,7 +90,7 @@ class SearchTest extends AbstractTestCase * * @return array */ - public function searchTypes(): array + public static function searchTypes(): array { return [ [ diff --git a/test/classes/Database/TriggersTest.php b/test/classes/Database/TriggersTest.php index e67c7a5cff..210ad33a37 100644 --- a/test/classes/Database/TriggersTest.php +++ b/test/classes/Database/TriggersTest.php @@ -66,7 +66,7 @@ class TriggersTest extends AbstractTestCase * * @return array */ - public function providerGetDataFromRequestEmpty(): array + public static function providerGetDataFromRequestEmpty(): array { return [ [ @@ -134,7 +134,7 @@ class TriggersTest extends AbstractTestCase * * @return array */ - public function providerGetEditorFormAdd(): array + public static function providerGetEditorFormAdd(): array { $data = [ 'item_name' => '', @@ -180,7 +180,7 @@ class TriggersTest extends AbstractTestCase * * @return array */ - public function providerGetEditorFormEdit(): array + public static function providerGetEditorFormEdit(): array { $data = [ 'item_name' => 'foo', @@ -227,7 +227,7 @@ class TriggersTest extends AbstractTestCase * * @return array */ - public function providerGetEditorFormAjax(): array + public static function providerGetEditorFormAjax(): array { $data = [ 'item_name' => 'foo', @@ -290,7 +290,7 @@ class TriggersTest extends AbstractTestCase * * @return array */ - public function providerGetQueryFromRequest(): array + public static function providerGetQueryFromRequest(): array { return [ [ diff --git a/test/classes/DatabaseInterfaceTest.php b/test/classes/DatabaseInterfaceTest.php index 44890314c2..58f2e027e5 100644 --- a/test/classes/DatabaseInterfaceTest.php +++ b/test/classes/DatabaseInterfaceTest.php @@ -80,7 +80,7 @@ class DatabaseInterfaceTest extends AbstractTestCase * * @return array */ - public function currentUserData(): array + public static function currentUserData(): array { return [ [ @@ -394,7 +394,7 @@ class DatabaseInterfaceTest extends AbstractTestCase ); } - public function errorData(): array + public static function errorData(): array { return [ [ @@ -457,7 +457,7 @@ class DatabaseInterfaceTest extends AbstractTestCase * * @return array */ - public function isAmazonRdsData(): array + public static function isAmazonRdsData(): array { return [ [ @@ -497,7 +497,7 @@ class DatabaseInterfaceTest extends AbstractTestCase $this->assertEquals($upgrade, $ver_int < $GLOBALS['cfg']['MysqlMinVersion']['internal']); } - public function versionData(): array + public static function versionData(): array { return [ [ @@ -925,7 +925,7 @@ class DatabaseInterfaceTest extends AbstractTestCase * @return array * @psalm-return array, int, bool, bool}> */ - public function provideDatabaseVersionData(): array + public static function provideDatabaseVersionData(): array { return [ [ diff --git a/test/classes/Dbal/DatabaseNameTest.php b/test/classes/Dbal/DatabaseNameTest.php index 65e5202d1d..271be3b62b 100644 --- a/test/classes/Dbal/DatabaseNameTest.php +++ b/test/classes/Dbal/DatabaseNameTest.php @@ -62,7 +62,7 @@ class DatabaseNameTest extends TestCase * @return mixed[][] * @psalm-return non-empty-list */ - public function providerForTestInvalidMixedNames(): array + public static function providerForTestInvalidMixedNames(): array { return [ [null, 'Expected a string. Got: NULL'], diff --git a/test/classes/Dbal/DbiDummyTest.php b/test/classes/Dbal/DbiDummyTest.php index b1987f2ff6..afbf818867 100644 --- a/test/classes/Dbal/DbiDummyTest.php +++ b/test/classes/Dbal/DbiDummyTest.php @@ -69,7 +69,7 @@ class DbiDummyTest extends AbstractTestCase /** * Data provider for schema test */ - public function schemaData(): array + public static function schemaData(): array { return [ [ @@ -104,7 +104,7 @@ class DbiDummyTest extends AbstractTestCase /** * Data provider for error formatting test */ - public function errorData(): array + public static function errorData(): array { return [ [ diff --git a/test/classes/Dbal/TableNameTest.php b/test/classes/Dbal/TableNameTest.php index 7d195030f2..6f47964227 100644 --- a/test/classes/Dbal/TableNameTest.php +++ b/test/classes/Dbal/TableNameTest.php @@ -62,7 +62,7 @@ class TableNameTest extends TestCase * @return mixed[][] * @psalm-return non-empty-list */ - public function providerForTestInvalidMixedNames(): array + public static function providerForTestInvalidMixedNames(): array { return [ [null, 'Expected a string. Got: NULL'], diff --git a/test/classes/Dbal/WarningTest.php b/test/classes/Dbal/WarningTest.php index f1564311a4..ab59a7aff2 100644 --- a/test/classes/Dbal/WarningTest.php +++ b/test/classes/Dbal/WarningTest.php @@ -30,7 +30,7 @@ class WarningTest extends TestCase * @return int[][]|string[][]|string[][][] * @psalm-return array{string[], string, int, string, string}[] */ - public function providerForTestWarning(): array + public static function providerForTestWarning(): array { return [ [ diff --git a/test/classes/Display/ResultsTest.php b/test/classes/Display/ResultsTest.php index 200e1f0e4f..fc361ad087 100644 --- a/test/classes/Display/ResultsTest.php +++ b/test/classes/Display/ResultsTest.php @@ -141,7 +141,7 @@ class ResultsTest extends AbstractTestCase * * @return array array data for testGetTableNavigationButton */ - public function providerForTestGetTableNavigationButton(): array + public static function providerForTestGetTableNavigationButton(): array { return [ [ @@ -238,7 +238,7 @@ class ResultsTest extends AbstractTestCase * * @return array parameters and output */ - public function dataProviderForTestGetSpecialLinkUrl(): array + public static function dataProviderForTestGetSpecialLinkUrl(): array { return [ [ @@ -346,7 +346,7 @@ class ResultsTest extends AbstractTestCase * * @return array parameters and output */ - public function dataProviderForTestGetRowInfoForSpecialLinks(): array + public static function dataProviderForTestGetRowInfoForSpecialLinks(): array { $column_names = [ 'host', @@ -428,7 +428,7 @@ class ResultsTest extends AbstractTestCase * * @return array parameters and output */ - public function dataProviderForTestSetHighlightedColumnGlobalField(): array + public static function dataProviderForTestSetHighlightedColumnGlobalField(): array { $parser = new Parser('SELECT * FROM db_name WHERE `db_name`.`tbl`.id > 0 AND `id` < 10'); @@ -469,7 +469,7 @@ class ResultsTest extends AbstractTestCase * * @return array parameters and output */ - public function dataProviderForTestGetPartialText(): array + public static function dataProviderForTestGetPartialText(): array { return [ [ @@ -555,7 +555,7 @@ class ResultsTest extends AbstractTestCase * string * }} */ - public function dataProviderForTestHandleNonPrintableContents(): array + public static function dataProviderForTestHandleNonPrintableContents(): array { $transformation_plugin = new Text_Plain_Link(); $meta = new FieldMetadata(MYSQLI_TYPE_BLOB, 0, (object) ['orgtable' => 'bar']); @@ -692,7 +692,7 @@ class ResultsTest extends AbstractTestCase * string * }} */ - public function dataProviderForTestGetDataCellForNonNumericColumns(): array + public static function dataProviderForTestGetDataCellForNonNumericColumns(): array { $transformation_plugin = new Text_Plain_Link(); $transformation_plugin_external = new Text_Plain_External(); @@ -971,7 +971,7 @@ class ResultsTest extends AbstractTestCase $this->assertStringContainsString('>T<', $output); } - public function dataProviderGetSortOrderHiddenInputs(): array + public static function dataProviderGetSortOrderHiddenInputs(): array { // SQL to add the column // SQL to remove the column @@ -1180,7 +1180,7 @@ class ResultsTest extends AbstractTestCase $this->assertSame($expected, $_SESSION['tmpval']); } - public function providerSetConfigParamsForDisplayTable(): array + public static function providerSetConfigParamsForDisplayTable(): array { $cfg = ['RelationalDisplay' => DisplayResults::RELATIONAL_KEY, 'MaxRows' => 25, 'RepeatCells' => 100]; @@ -1671,7 +1671,7 @@ class ResultsTest extends AbstractTestCase /** * @return array[] */ - public function dataProviderSortOrder(): array + public static function dataProviderSortOrder(): array { return [ 'Default date' => [ diff --git a/test/classes/Engines/PbxtTest.php b/test/classes/Engines/PbxtTest.php index 1a8ce80b2d..3597e83002 100644 --- a/test/classes/Engines/PbxtTest.php +++ b/test/classes/Engines/PbxtTest.php @@ -179,7 +179,7 @@ class PbxtTest extends AbstractTestCase * * @return array */ - public function providerFortTestResolveTypeSize(): array + public static function providerFortTestResolveTypeSize(): array { return [ [ diff --git a/test/classes/ErrorHandlerTest.php b/test/classes/ErrorHandlerTest.php index 23b4bbfb28..fb140a3f65 100644 --- a/test/classes/ErrorHandlerTest.php +++ b/test/classes/ErrorHandlerTest.php @@ -58,7 +58,7 @@ class ErrorHandlerTest extends AbstractTestCase * * @return array data for testHandleError */ - public function providerForTestHandleError(): array + public static function providerForTestHandleError(): array { return [ [ @@ -130,6 +130,7 @@ class ErrorHandlerTest extends AbstractTestCase * disabled * * @dataProvider providerForTestHandleError + * @requires PHPUnit < 10 */ public function testGetDispErrorsForDisplayTrue( int $errno, diff --git a/test/classes/ErrorReportTest.php b/test/classes/ErrorReportTest.php index 19373305fc..b5fc4b4b82 100644 --- a/test/classes/ErrorReportTest.php +++ b/test/classes/ErrorReportTest.php @@ -276,7 +276,7 @@ class ErrorReportTest extends AbstractTestCase * * @return array[] */ - public function urlsToSanitize(): array + public static function urlsToSanitize(): array { return [ [ diff --git a/test/classes/ErrorTest.php b/test/classes/ErrorTest.php index 27061e0988..546cc7a2b3 100644 --- a/test/classes/ErrorTest.php +++ b/test/classes/ErrorTest.php @@ -84,7 +84,7 @@ class ErrorTest extends AbstractTestCase * * @return array */ - public function filePathProvider(): array + public static function filePathProvider(): array { return [ [ @@ -116,6 +116,8 @@ class ErrorTest extends AbstractTestCase /** * Test for getBacktraceDisplay + * + * @requires PHPUnit < 10 */ public function testGetBacktraceDisplay(): void { diff --git a/test/classes/FileTest.php b/test/classes/FileTest.php index dcefad0948..dbadf6d097 100644 --- a/test/classes/FileTest.php +++ b/test/classes/FileTest.php @@ -69,7 +69,7 @@ class FileTest extends AbstractTestCase $file->close(); } - public function compressedFiles(): array + public static function compressedFiles(): array { return [ [ diff --git a/test/classes/Gis/GisFactoryTest.php b/test/classes/Gis/GisFactoryTest.php index 08353babff..aaa30864f3 100644 --- a/test/classes/Gis/GisFactoryTest.php +++ b/test/classes/Gis/GisFactoryTest.php @@ -38,7 +38,7 @@ class GisFactoryTest extends AbstractTestCase * * @return array[] data for testFactory */ - public function providerForTestFactory(): array + public static function providerForTestFactory(): array { return [ [ diff --git a/test/classes/Gis/GisGeometryCollectionTest.php b/test/classes/Gis/GisGeometryCollectionTest.php index 6df045ef21..89755bf4f4 100644 --- a/test/classes/Gis/GisGeometryCollectionTest.php +++ b/test/classes/Gis/GisGeometryCollectionTest.php @@ -57,7 +57,7 @@ class GisGeometryCollectionTest extends AbstractTestCase * * @return array test data for testScaleRow() test case */ - public function providerForScaleRow(): array + public static function providerForScaleRow(): array { return [ [ @@ -95,7 +95,7 @@ class GisGeometryCollectionTest extends AbstractTestCase * * @return array test data for testGenerateWkt() test case */ - public function providerForGenerateWkt(): array + public static function providerForGenerateWkt(): array { $temp1 = [ 0 => [ @@ -208,7 +208,7 @@ class GisGeometryCollectionTest extends AbstractTestCase * * @return array test data for testGenerateParams() test case */ - public function providerForGenerateParams(): array + public static function providerForGenerateParams(): array { return [ [ @@ -280,7 +280,7 @@ class GisGeometryCollectionTest extends AbstractTestCase * * @return array test data for testPrepareRowAsPdf() test case */ - public function providerForPrepareRowAsPdf(): array + public static function providerForPrepareRowAsPdf(): array { return [ [ @@ -319,7 +319,7 @@ class GisGeometryCollectionTest extends AbstractTestCase $string = $this->object->prepareRowAsSvg($spatial, $label, $lineColor, $scaleData); $this->assertEquals(1, preg_match($output, $string)); - $this->assertMatchesRegularExpression( + $this->assertMatchesRegularExpressionCompat( $output, $this->object->prepareRowAsSvg($spatial, $label, $lineColor, $scaleData) ); @@ -330,7 +330,7 @@ class GisGeometryCollectionTest extends AbstractTestCase * * @return array test data for testPrepareRowAsSvg() test case */ - public function providerForPrepareRowAsSvg(): array + public static function providerForPrepareRowAsSvg(): array { return [ [ @@ -388,7 +388,7 @@ class GisGeometryCollectionTest extends AbstractTestCase * * @return array test data for testPrepareRowAsOl() test case */ - public function providerForPrepareRowAsOl(): array + public static function providerForPrepareRowAsOl(): array { return [ [ diff --git a/test/classes/Gis/GisGeometryTest.php b/test/classes/Gis/GisGeometryTest.php index 3648f0a4f8..f6b9a89eaa 100644 --- a/test/classes/Gis/GisGeometryTest.php +++ b/test/classes/Gis/GisGeometryTest.php @@ -66,7 +66,7 @@ class GisGeometryTest extends AbstractTestCase * * @return array data for testSetMinMax */ - public function providerForTestSetMinMax(): array + public static function providerForTestSetMinMax(): array { return [ [ @@ -123,7 +123,7 @@ class GisGeometryTest extends AbstractTestCase * * @return array data for testGenerateParams */ - public function providerForTestGenerateParams(): array + public static function providerForTestGenerateParams(): array { return [ [ @@ -182,7 +182,7 @@ class GisGeometryTest extends AbstractTestCase * * @return array data for testExtractPoints */ - public function providerForTestExtractPoints(): array + public static function providerForTestExtractPoints(): array { return [ // with no scale data @@ -297,7 +297,7 @@ class GisGeometryTest extends AbstractTestCase * * @return array test data for the testGetBoundsForOl() test case */ - public function providerForTestGetBoundsForOl(): array + public static function providerForTestGetBoundsForOl(): array { return [ [ @@ -349,7 +349,7 @@ class GisGeometryTest extends AbstractTestCase * * @return array test data for testGetPolygonArrayForOpenLayers() test case */ - public function providerForTestGetPolygonArrayForOpenLayers(): array + public static function providerForTestGetPolygonArrayForOpenLayers(): array { return [ [ diff --git a/test/classes/Gis/GisLineStringTest.php b/test/classes/Gis/GisLineStringTest.php index fbfa38029f..e597a366dd 100644 --- a/test/classes/Gis/GisLineStringTest.php +++ b/test/classes/Gis/GisLineStringTest.php @@ -43,7 +43,7 @@ class GisLineStringTest extends GisGeomTestCase * * @return array data for testGenerateWkt */ - public function providerForTestGenerateWkt(): array + public static function providerForTestGenerateWkt(): array { $temp1 = [ 0 => [ @@ -108,7 +108,7 @@ class GisLineStringTest extends GisGeomTestCase * * @return array data for testGenerateParams */ - public function providerForTestGenerateParams(): array + public static function providerForTestGenerateParams(): array { $temp = [ 'LINESTRING' => [ @@ -148,7 +148,7 @@ class GisLineStringTest extends GisGeomTestCase * * @return array data for testScaleRow */ - public function providerForTestScaleRow(): array + public static function providerForTestScaleRow(): array { return [ [ @@ -208,7 +208,7 @@ class GisLineStringTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsPdf() test case */ - public function providerForPrepareRowAsPdf(): array + public static function providerForPrepareRowAsPdf(): array { return [ [ @@ -253,7 +253,7 @@ class GisLineStringTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsSvg() test case */ - public function providerForPrepareRowAsSvg(): array + public static function providerForPrepareRowAsSvg(): array { return [ [ @@ -310,7 +310,7 @@ class GisLineStringTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsOl() test case */ - public function providerForPrepareRowAsOl(): array + public static function providerForPrepareRowAsOl(): array { return [ [ diff --git a/test/classes/Gis/GisMultiLineStringTest.php b/test/classes/Gis/GisMultiLineStringTest.php index 0afc3680e0..b56b744ed6 100644 --- a/test/classes/Gis/GisMultiLineStringTest.php +++ b/test/classes/Gis/GisMultiLineStringTest.php @@ -43,7 +43,7 @@ class GisMultiLineStringTest extends GisGeomTestCase * * @return array data for testGenerateWkt */ - public function providerForTestGenerateWkt(): array + public static function providerForTestGenerateWkt(): array { $temp = [ 0 => [ @@ -175,7 +175,7 @@ class GisMultiLineStringTest extends GisGeomTestCase * * @return array data for testGenerateParams */ - public function providerForTestGenerateParams(): array + public static function providerForTestGenerateParams(): array { $temp = [ 'MULTILINESTRING' => [ @@ -230,7 +230,7 @@ class GisMultiLineStringTest extends GisGeomTestCase * * @return array data for testScaleRow */ - public function providerForTestScaleRow(): array + public static function providerForTestScaleRow(): array { return [ [ @@ -290,7 +290,7 @@ class GisMultiLineStringTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsPdf() test case */ - public function providerForPrepareRowAsPdf(): array + public static function providerForPrepareRowAsPdf(): array { return [ [ @@ -335,7 +335,7 @@ class GisMultiLineStringTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsSvg() test case */ - public function providerForPrepareRowAsSvg(): array + public static function providerForPrepareRowAsSvg(): array { return [ [ @@ -394,7 +394,7 @@ class GisMultiLineStringTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsOl() test case */ - public function providerForPrepareRowAsOl(): array + public static function providerForPrepareRowAsOl(): array { return [ [ diff --git a/test/classes/Gis/GisMultiPointTest.php b/test/classes/Gis/GisMultiPointTest.php index 5ec5dcebcf..efebcb8885 100644 --- a/test/classes/Gis/GisMultiPointTest.php +++ b/test/classes/Gis/GisMultiPointTest.php @@ -43,7 +43,7 @@ class GisMultiPointTest extends GisGeomTestCase * * @return array data for testGenerateWkt */ - public function providerForTestGenerateWkt(): array + public static function providerForTestGenerateWkt(): array { $gis_data1 = [ 0 => [ @@ -110,7 +110,7 @@ class GisMultiPointTest extends GisGeomTestCase * * @return array data for testGenerateParams */ - public function providerForTestGenerateParams(): array + public static function providerForTestGenerateParams(): array { $temp1 = [ 'MULTIPOINT' => [ @@ -150,7 +150,7 @@ class GisMultiPointTest extends GisGeomTestCase * * @return array data for testScaleRow */ - public function providerForTestScaleRow(): array + public static function providerForTestScaleRow(): array { return [ [ @@ -210,7 +210,7 @@ class GisMultiPointTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsPdf() test case */ - public function providerForPrepareRowAsPdf(): array + public static function providerForPrepareRowAsPdf(): array { return [ [ @@ -255,7 +255,7 @@ class GisMultiPointTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsSvg() test case */ - public function providerForPrepareRowAsSvg(): array + public static function providerForPrepareRowAsSvg(): array { return [ [ @@ -320,7 +320,7 @@ class GisMultiPointTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsOl() test case */ - public function providerForPrepareRowAsOl(): array + public static function providerForPrepareRowAsOl(): array { return [ [ diff --git a/test/classes/Gis/GisMultiPolygonTest.php b/test/classes/Gis/GisMultiPolygonTest.php index ac388a790a..1d03304590 100644 --- a/test/classes/Gis/GisMultiPolygonTest.php +++ b/test/classes/Gis/GisMultiPolygonTest.php @@ -43,7 +43,7 @@ class GisMultiPolygonTest extends GisGeomTestCase * * @return array common data for data providers */ - private function getData(): array + private static function getData(): array { return [ 'MULTIPOLYGON' => [ @@ -124,10 +124,10 @@ class GisMultiPolygonTest extends GisGeomTestCase * * @return array data for testGenerateWkt */ - public function providerForTestGenerateWkt(): array + public static function providerForTestGenerateWkt(): array { $temp = [ - 0 => $this->getData(), + 0 => self::getData(), ]; $temp1 = $temp; @@ -178,11 +178,11 @@ class GisMultiPolygonTest extends GisGeomTestCase * * @return array data for testGenerateParams */ - public function providerForTestGenerateParams(): array + public static function providerForTestGenerateParams(): array { - $temp = $this->getData(); + $temp = self::getData(); - $temp1 = $this->getData(); + $temp1 = self::getData(); $temp1['gis_type'] = 'MULTIPOLYGON'; return [ @@ -222,7 +222,7 @@ class GisMultiPolygonTest extends GisGeomTestCase * * @return array data for testGetShape */ - public function providerForTestGetShape(): array + public static function providerForTestGetShape(): array { return [ [ @@ -305,7 +305,7 @@ class GisMultiPolygonTest extends GisGeomTestCase * * @return array data for testScaleRow */ - public function providerForTestScaleRow(): array + public static function providerForTestScaleRow(): array { return [ [ @@ -375,7 +375,7 @@ class GisMultiPolygonTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsPdf() test case */ - public function providerForPrepareRowAsPdf(): array + public static function providerForPrepareRowAsPdf(): array { return [ [ @@ -420,7 +420,7 @@ class GisMultiPolygonTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsSvg() test case */ - public function providerForPrepareRowAsSvg(): array + public static function providerForPrepareRowAsSvg(): array { return [ [ @@ -481,7 +481,7 @@ class GisMultiPolygonTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsOl() test case */ - public function providerForPrepareRowAsOl(): array + public static function providerForPrepareRowAsOl(): array { return [ [ diff --git a/test/classes/Gis/GisPointTest.php b/test/classes/Gis/GisPointTest.php index 8f5192b09d..1dd95028b2 100644 --- a/test/classes/Gis/GisPointTest.php +++ b/test/classes/Gis/GisPointTest.php @@ -41,7 +41,7 @@ class GisPointTest extends GisGeomTestCase * * @return array data for testGenerateWkt */ - public function providerForTestGenerateWkt(): array + public static function providerForTestGenerateWkt(): array { return [ [ @@ -109,7 +109,7 @@ class GisPointTest extends GisGeomTestCase * * @return array data for testGetShape */ - public function providerForTestGetShape(): array + public static function providerForTestGetShape(): array { return [ [ @@ -127,7 +127,7 @@ class GisPointTest extends GisGeomTestCase * * @return array data for testGenerateParams */ - public function providerForTestGenerateParams(): array + public static function providerForTestGenerateParams(): array { return [ [ @@ -164,7 +164,7 @@ class GisPointTest extends GisGeomTestCase * * @return array data for testScaleRow */ - public function providerForTestScaleRow(): array + public static function providerForTestScaleRow(): array { return [ [ @@ -224,7 +224,7 @@ class GisPointTest extends GisGeomTestCase * * @return array test data for prepareRowAsPdf() test case */ - public function providerForPrepareRowAsPdf(): array + public static function providerForPrepareRowAsPdf(): array { return [ [ @@ -276,7 +276,7 @@ class GisPointTest extends GisGeomTestCase * * @return array test data for prepareRowAsSvg() test case */ - public function providerForPrepareRowAsSvg(): array + public static function providerForPrepareRowAsSvg(): array { return [ [ @@ -331,7 +331,7 @@ class GisPointTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsOl() test case */ - public function providerForPrepareRowAsOl(): array + public static function providerForPrepareRowAsOl(): array { return [ [ diff --git a/test/classes/Gis/GisPolygonTest.php b/test/classes/Gis/GisPolygonTest.php index 98598e9b92..f665c0a60e 100644 --- a/test/classes/Gis/GisPolygonTest.php +++ b/test/classes/Gis/GisPolygonTest.php @@ -43,7 +43,7 @@ class GisPolygonTest extends GisGeomTestCase * * @return array common data for data providers */ - private function getData(): array + private static function getData(): array { return [ 'POLYGON' => [ @@ -99,10 +99,10 @@ class GisPolygonTest extends GisGeomTestCase * * @return array data for testGenerateWkt */ - public function providerForTestGenerateWkt(): array + public static function providerForTestGenerateWkt(): array { $temp = [ - 0 => $this->getData(), + 0 => self::getData(), ]; $temp1 = $temp; @@ -164,9 +164,9 @@ class GisPolygonTest extends GisGeomTestCase * * @return array data for testGenerateParams */ - public function providerForTestGenerateParams(): array + public static function providerForTestGenerateParams(): array { - $temp = $this->getData(); + $temp = self::getData(); $temp1 = $temp; $temp1['gis_type'] = 'POLYGON'; @@ -206,7 +206,7 @@ class GisPolygonTest extends GisGeomTestCase * * @return array data for testArea */ - public function providerForTestArea(): array + public static function providerForTestArea(): array { return [ [ @@ -291,7 +291,7 @@ class GisPolygonTest extends GisGeomTestCase * * @return array data for testIsPointInsidePolygon */ - public function providerForTestIsPointInsidePolygon(): array + public static function providerForTestIsPointInsidePolygon(): array { $ring = [ 0 => [ @@ -371,9 +371,9 @@ class GisPolygonTest extends GisGeomTestCase * * @return array data for testGetPointOnSurface */ - public function providerForTestGetPointOnSurface(): array + public static function providerForTestGetPointOnSurface(): array { - $temp = $this->getData(); + $temp = self::getData(); unset($temp['POLYGON'][0]['no_of_points']); unset($temp['POLYGON'][1]['no_of_points']); @@ -392,7 +392,7 @@ class GisPolygonTest extends GisGeomTestCase * * @return array data for testScaleRow */ - public function providerForTestScaleRow(): array + public static function providerForTestScaleRow(): array { return [ [ @@ -461,7 +461,7 @@ class GisPolygonTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsPdf() test case */ - public function providerForPrepareRowAsPdf(): array + public static function providerForPrepareRowAsPdf(): array { return [ [ @@ -506,7 +506,7 @@ class GisPolygonTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsSvg() test case */ - public function providerForPrepareRowAsSvg(): array + public static function providerForPrepareRowAsSvg(): array { return [ [ @@ -564,7 +564,7 @@ class GisPolygonTest extends GisGeomTestCase * * @return array test data for testPrepareRowAsOl() test case */ - public function providerForPrepareRowAsOl(): array + public static function providerForPrepareRowAsOl(): array { return [ [ @@ -614,7 +614,7 @@ class GisPolygonTest extends GisGeomTestCase * * @return array test data for testIsOuterRing() test case */ - public function providerForIsOuterRing(): array + public static function providerForIsOuterRing(): array { return [ [ diff --git a/test/classes/HeaderTest.php b/test/classes/HeaderTest.php index 5046b06e0c..4d21dfc611 100644 --- a/test/classes/HeaderTest.php +++ b/test/classes/HeaderTest.php @@ -184,7 +184,7 @@ class HeaderTest extends AbstractTestCase $this->assertSame($expected, $headers); } - public function providerForTestGetHttpHeaders(): array + public static function providerForTestGetHttpHeaders(): array { return [ [ diff --git a/test/classes/Html/GeneratorTest.php b/test/classes/Html/GeneratorTest.php index 2b29e67088..91a78def6c 100644 --- a/test/classes/Html/GeneratorTest.php +++ b/test/classes/Html/GeneratorTest.php @@ -9,7 +9,6 @@ use PhpMyAdmin\Html\Generator; use PhpMyAdmin\Message; use PhpMyAdmin\Tests\AbstractTestCase; use PhpMyAdmin\Tests\Stubs\DbiDummy; -use PhpMyAdmin\Url; use PhpMyAdmin\Util; use PhpMyAdmin\Utils\SessionCache; @@ -204,6 +203,8 @@ class GeneratorTest extends AbstractTestCase */ public function testLinkOrButton(array $params, int $limit, string $match): void { + parent::setGlobalConfig(); + $restore = $GLOBALS['cfg']['LinkLengthLimit'] ?? 1000; $GLOBALS['cfg']['LinkLengthLimit'] = $limit; try { @@ -225,10 +226,8 @@ class GeneratorTest extends AbstractTestCase * * @return array */ - public function linksOrButtons(): array + public static function linksOrButtons(): array { - parent::setGlobalConfig(); - return [ [ [ @@ -298,7 +297,7 @@ class GeneratorTest extends AbstractTestCase ], [ [ - Url::getFromRoute('/server/databases'), + 'index.php?route=/server/databases', ['some' => 'parameter'], 'text', ], @@ -307,7 +306,7 @@ class GeneratorTest extends AbstractTestCase ], [ [ - Url::getFromRoute('/server/databases'), + 'index.php?route=/server/databases', null, 'text', ], @@ -316,7 +315,7 @@ class GeneratorTest extends AbstractTestCase ], [ [ - Url::getFromRoute('/server/databases'), + 'index.php?route=/server/databases', ['some' => 'parameter'], 'text', ], @@ -325,7 +324,7 @@ class GeneratorTest extends AbstractTestCase ], [ [ - Url::getFromRoute('/server/databases'), + 'index.php?route=/server/databases', null, 'text', ], @@ -493,7 +492,7 @@ class GeneratorTest extends AbstractTestCase * @return array * @psalm-return array, bool, string}> */ - public function providerForTestGetDefaultFunctionForField(): array + public static function providerForTestGetDefaultFunctionForField(): array { return [ [ diff --git a/test/classes/Http/Factory/ServerRequestFactoryTest.php b/test/classes/Http/Factory/ServerRequestFactoryTest.php index 01f73f53be..6c4880df93 100644 --- a/test/classes/Http/Factory/ServerRequestFactoryTest.php +++ b/test/classes/Http/Factory/ServerRequestFactoryTest.php @@ -39,7 +39,7 @@ class ServerRequestFactoryTest extends AbstractTestCase ], ]; - public function dataProviderPsr7Implementations(): array + public static function dataProviderPsr7Implementations(): array { return self::IMPLEMENTATION_CLASSES; } @@ -114,6 +114,9 @@ class ServerRequestFactoryTest extends AbstractTestCase ], $request->getQueryParams()); } + /** + * @requires PHPUnit < 10 + */ public function testCreateServerRequestFromGlobals(): void { $_GET['foo'] = 'bar'; diff --git a/test/classes/ImportTest.php b/test/classes/ImportTest.php index 6cd7ea0225..474f2817e9 100644 --- a/test/classes/ImportTest.php +++ b/test/classes/ImportTest.php @@ -152,7 +152,7 @@ class ImportTest extends AbstractTestCase * * @return array */ - public function provGetColumnAlphaName(): array + public static function provGetColumnAlphaName(): array { return [ [ @@ -200,7 +200,7 @@ class ImportTest extends AbstractTestCase * * @return array */ - public function provGetColumnNumberFromName(): array + public static function provGetColumnNumberFromName(): array { return [ [ @@ -248,7 +248,7 @@ class ImportTest extends AbstractTestCase * * @return array */ - public function provGetDecimalPrecision(): array + public static function provGetDecimalPrecision(): array { return [ [ @@ -288,7 +288,7 @@ class ImportTest extends AbstractTestCase * * @return array */ - public function provGetDecimalScale(): array + public static function provGetDecimalScale(): array { return [ [ @@ -328,7 +328,7 @@ class ImportTest extends AbstractTestCase * * @return array */ - public function provGetDecimalSize(): array + public static function provGetDecimalSize(): array { return [ [ @@ -387,7 +387,7 @@ class ImportTest extends AbstractTestCase * * @return array */ - public function provDetectType(): array + public static function provDetectType(): array { $data = [ [ @@ -493,7 +493,7 @@ class ImportTest extends AbstractTestCase * * @return array[] */ - public function providerContentWithByteOrderMarks(): array + public static function providerContentWithByteOrderMarks(): array { return [ [ diff --git a/test/classes/InsertEditTest.php b/test/classes/InsertEditTest.php index b6db4bf505..3a3a961027 100644 --- a/test/classes/InsertEditTest.php +++ b/test/classes/InsertEditTest.php @@ -351,7 +351,7 @@ class InsertEditTest extends AbstractTestCase $this->assertFalse($result); } - public function dataProviderConfigValueInsertRows(): array + public static function dataProviderConfigValueInsertRows(): array { return [ [ @@ -1661,7 +1661,7 @@ class InsertEditTest extends AbstractTestCase * @return array * @psalm-return array, array}> */ - public function providerForTestGetSpecialCharsAndBackupFieldForInsertingMode(): array + public static function providerForTestGetSpecialCharsAndBackupFieldForInsertingMode(): array { return [ 'bit' => [ diff --git a/test/classes/IpAllowDenyTest.php b/test/classes/IpAllowDenyTest.php index 7c16ee6ecf..15be0af0b0 100644 --- a/test/classes/IpAllowDenyTest.php +++ b/test/classes/IpAllowDenyTest.php @@ -77,7 +77,7 @@ class IpAllowDenyTest extends AbstractTestCase * * @return array */ - public function proxyIPs(): array + public static function proxyIPs(): array { return [ // Nothing set diff --git a/test/classes/LanguageTest.php b/test/classes/LanguageTest.php index d2ae460005..fa40b7382e 100644 --- a/test/classes/LanguageTest.php +++ b/test/classes/LanguageTest.php @@ -198,7 +198,7 @@ class LanguageTest extends AbstractTestCase * * @return string[][] */ - public function selectDataProvider(): array + public static function selectDataProvider(): array { return [ ['cs', 'en', '', '', '', '', '', 'cs'], @@ -257,7 +257,7 @@ class LanguageTest extends AbstractTestCase * * @return array with arrays of available locales */ - public function listLocales(): array + public static function listLocales(): array { $ret = []; foreach (LanguageManager::getInstance()->availableLanguages() as $language) { diff --git a/test/classes/MessageTest.php b/test/classes/MessageTest.php index d9b9b9f7ed..445adf0d0f 100644 --- a/test/classes/MessageTest.php +++ b/test/classes/MessageTest.php @@ -331,7 +331,7 @@ class MessageTest extends AbstractTestCase * * @return array Test data */ - public function decodeBBDataProvider(): array + public static function decodeBBDataProvider(): array { return [ [ @@ -513,7 +513,7 @@ class MessageTest extends AbstractTestCase * * @return array Test-data */ - public function providerAffectedRows(): array + public static function providerAffectedRows(): array { return [ [ @@ -558,7 +558,7 @@ class MessageTest extends AbstractTestCase * * @return array Test-data */ - public function providerInsertedRows(): array + public static function providerInsertedRows(): array { return [ [ @@ -603,7 +603,7 @@ class MessageTest extends AbstractTestCase * * @return array Test-data */ - public function providerDeletedRows(): array + public static function providerDeletedRows(): array { return [ [ diff --git a/test/classes/MimeTest.php b/test/classes/MimeTest.php index 0df9a91bd7..3b5f10350d 100644 --- a/test/classes/MimeTest.php +++ b/test/classes/MimeTest.php @@ -34,7 +34,7 @@ class MimeTest extends AbstractTestCase * * @return array data for testDetect */ - public function providerForTestDetect(): array + public static function providerForTestDetect(): array { return [ [ diff --git a/test/classes/Navigation/NodeFactoryTest.php b/test/classes/Navigation/NodeFactoryTest.php index 6429b8be6c..3e568db2e2 100644 --- a/test/classes/Navigation/NodeFactoryTest.php +++ b/test/classes/Navigation/NodeFactoryTest.php @@ -48,6 +48,7 @@ class NodeFactoryTest extends AbstractTestCase /** * @group with-trigger-error + * @requires PHPUnit < 10 */ public function testFileError(): void { @@ -58,6 +59,7 @@ class NodeFactoryTest extends AbstractTestCase /** * @group with-trigger-error + * @requires PHPUnit < 10 */ public function testClassNameError(): void { diff --git a/test/classes/Navigation/Nodes/NodeTableTest.php b/test/classes/Navigation/Nodes/NodeTableTest.php index 739d868854..dd0921e019 100644 --- a/test/classes/Navigation/Nodes/NodeTableTest.php +++ b/test/classes/Navigation/Nodes/NodeTableTest.php @@ -70,7 +70,7 @@ class NodeTableTest extends AbstractTestCase * * @return array data for testIcon() */ - public function providerForTestIcon(): array + public static function providerForTestIcon(): array { return [ ['structure', 'b_props', 'Structure'], diff --git a/test/classes/OperationsTest.php b/test/classes/OperationsTest.php index fea0406c4a..0df8426c36 100644 --- a/test/classes/OperationsTest.php +++ b/test/classes/OperationsTest.php @@ -53,7 +53,7 @@ class OperationsTest extends AbstractTestCase /** * @psalm-return array}> */ - public function providerGetPartitionMaintenanceChoices(): array + public static function providerGetPartitionMaintenanceChoices(): array { return [ 'no partition method' => ['no_partition_method', ['COALESCE' => 'Coalesce']], diff --git a/test/classes/Partitioning/TablePartitionDefinitionTest.php b/test/classes/Partitioning/TablePartitionDefinitionTest.php index 6de05c7024..cf0e7b44c4 100644 --- a/test/classes/Partitioning/TablePartitionDefinitionTest.php +++ b/test/classes/Partitioning/TablePartitionDefinitionTest.php @@ -149,7 +149,7 @@ class TablePartitionDefinitionTest extends TestCase * 0: string, 1: bool, 2: bool, 3: int, 4: int, 5: array[]>[]|null * }> */ - public function providerGetDetails(): array + public static function providerGetDetails(): array { return [ 'partition by RANGE' => ['RANGE', true, true, 2, 2, [['name' => 'part0']]], @@ -258,7 +258,7 @@ class TablePartitionDefinitionTest extends TestCase /** * @psalm-return array{0: int, 1: string}[] */ - public function providerGetDetailsWithMaxPartitions(): array + public static function providerGetDetailsWithMaxPartitions(): array { return ['count within the limit' => [8192, '8192'], 'count above the limit' => [8192, '8193']]; } diff --git a/test/classes/Plugins/Auth/AuthenticationCookieTest.php b/test/classes/Plugins/Auth/AuthenticationCookieTest.php index cd578a8a56..84c9de9e61 100644 --- a/test/classes/Plugins/Auth/AuthenticationCookieTest.php +++ b/test/classes/Plugins/Auth/AuthenticationCookieTest.php @@ -723,6 +723,9 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase $this->object->rememberCredentials(); } + /** + * @requires PHPUnit < 10 + */ public function testAuthFailsNoPass(): void { $this->object = $this->getMockBuilder(AuthenticationCookie::class) @@ -745,7 +748,7 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase ); } - public function dataProviderPasswordLength(): array + public static function dataProviderPasswordLength(): array { return [ [ @@ -794,6 +797,9 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase $this->assertEquals($GLOBALS['conn_error'], $connError); } + /** + * @requires PHPUnit < 10 + */ public function testAuthFailsDeny(): void { $this->object = $this->getMockBuilder(AuthenticationCookie::class) @@ -813,6 +819,9 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase $this->assertEquals($GLOBALS['conn_error'], 'Access denied!'); } + /** + * @requires PHPUnit < 10 + */ public function testAuthFailsActivity(): void { $this->object = $this->getMockBuilder(AuthenticationCookie::class) @@ -838,6 +847,9 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase ); } + /** + * @requires PHPUnit < 10 + */ public function testAuthFailsDBI(): void { $this->object = $this->getMockBuilder(AuthenticationCookie::class) @@ -868,6 +880,9 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase $this->assertEquals($GLOBALS['conn_error'], '#42 Cannot log in to the MySQL server'); } + /** + * @requires PHPUnit < 10 + */ public function testAuthFailsErrno(): void { $this->object = $this->getMockBuilder(AuthenticationCookie::class) @@ -1061,7 +1076,7 @@ class AuthenticationCookieTest extends AbstractNetworkTestCase } } - public function checkRulesProvider(): array + public static function checkRulesProvider(): array { return [ 'nopass-ok' => [ diff --git a/test/classes/Plugins/Auth/AuthenticationHttpTest.php b/test/classes/Plugins/Auth/AuthenticationHttpTest.php index 25e0144f62..2e45610e6d 100644 --- a/test/classes/Plugins/Auth/AuthenticationHttpTest.php +++ b/test/classes/Plugins/Auth/AuthenticationHttpTest.php @@ -117,6 +117,9 @@ class AuthenticationHttpTest extends AbstractNetworkTestCase } } + /** + * @requires PHPUnit < 10 + */ public function testAuthLogoutUrl(): void { $_REQUEST['old_usr'] = '1'; @@ -130,6 +133,9 @@ class AuthenticationHttpTest extends AbstractNetworkTestCase ); } + /** + * @requires PHPUnit < 10 + */ public function testAuthVerbose(): void { $_REQUEST['old_usr'] = ''; @@ -145,6 +151,9 @@ class AuthenticationHttpTest extends AbstractNetworkTestCase ); } + /** + * @requires PHPUnit < 10 + */ public function testAuthHost(): void { $GLOBALS['cfg']['Server']['verbose'] = ''; @@ -160,6 +169,9 @@ class AuthenticationHttpTest extends AbstractNetworkTestCase ); } + /** + * @requires PHPUnit < 10 + */ public function testAuthRealm(): void { $GLOBALS['cfg']['Server']['host'] = ''; @@ -220,7 +232,7 @@ class AuthenticationHttpTest extends AbstractNetworkTestCase * * @return array Test data */ - public function readCredentialsProvider(): array + public static function readCredentialsProvider(): array { return [ [ diff --git a/test/classes/Plugins/Export/ExportOdsTest.php b/test/classes/Plugins/Export/ExportOdsTest.php index 2c2268e4b8..818f1fb093 100644 --- a/test/classes/Plugins/Export/ExportOdsTest.php +++ b/test/classes/Plugins/Export/ExportOdsTest.php @@ -167,6 +167,9 @@ class ExportOdsTest extends AbstractTestCase ); } + /** + * @requires PHPUnit < 10 + */ public function testExportFooter(): void { $GLOBALS['ods_buffer'] = 'header'; diff --git a/test/classes/Plugins/Export/ExportOdtTest.php b/test/classes/Plugins/Export/ExportOdtTest.php index fb63ff84a0..a66bb920d1 100644 --- a/test/classes/Plugins/Export/ExportOdtTest.php +++ b/test/classes/Plugins/Export/ExportOdtTest.php @@ -290,6 +290,9 @@ class ExportOdtTest extends AbstractTestCase $this->assertStringContainsString('office:version', $GLOBALS['odt_buffer']); } + /** + * @requires PHPUnit < 10 + */ public function testExportFooter(): void { $GLOBALS['odt_buffer'] = 'header'; diff --git a/test/classes/Plugins/Export/ExportSqlTest.php b/test/classes/Plugins/Export/ExportSqlTest.php index 0ab588448e..52c3f72a64 100644 --- a/test/classes/Plugins/Export/ExportSqlTest.php +++ b/test/classes/Plugins/Export/ExportSqlTest.php @@ -748,6 +748,7 @@ class ExportSqlTest extends AbstractTestCase /** * @group medium + * @requires PHPUnit < 10 */ public function testGetTableDef(): void { @@ -872,6 +873,9 @@ class ExportSqlTest extends AbstractTestCase $this->assertStringContainsString('DROP FOREIGN KEY', $GLOBALS['sql_drop_foreign_keys']); } + /** + * @requires PHPUnit < 10 + */ public function testGetTableDefWithError(): void { $GLOBALS['sql_compatibility'] = ''; diff --git a/test/classes/Plugins/Export/Helpers/TablePropertyTest.php b/test/classes/Plugins/Export/Helpers/TablePropertyTest.php index e8b5b1078a..b200c34942 100644 --- a/test/classes/Plugins/Export/Helpers/TablePropertyTest.php +++ b/test/classes/Plugins/Export/Helpers/TablePropertyTest.php @@ -95,7 +95,7 @@ class TablePropertyTest extends AbstractTestCase * * @return array Test Data */ - public function isNotNullProvider(): array + public static function isNotNullProvider(): array { return [ [ @@ -134,7 +134,7 @@ class TablePropertyTest extends AbstractTestCase * * @return array Test Data */ - public function isUniqueProvider(): array + public static function isUniqueProvider(): array { return [ [ @@ -181,7 +181,7 @@ class TablePropertyTest extends AbstractTestCase * * @return array Test Data */ - public function getDotNetPrimitiveTypeProvider(): array + public static function getDotNetPrimitiveTypeProvider(): array { return [ [ @@ -252,7 +252,7 @@ class TablePropertyTest extends AbstractTestCase * * @return array Test Data */ - public function getDotNetObjectTypeProvider(): array + public static function getDotNetObjectTypeProvider(): array { return [ [ diff --git a/test/classes/Plugins/Import/ImportOdsTest.php b/test/classes/Plugins/Import/ImportOdsTest.php index 10f289f035..57205b60e0 100644 --- a/test/classes/Plugins/Import/ImportOdsTest.php +++ b/test/classes/Plugins/Import/ImportOdsTest.php @@ -128,7 +128,7 @@ class ImportOdsTest extends AbstractTestCase $this->assertTrue($GLOBALS['finished']); } - public function dataProviderOdsEmptyRows(): array + public static function dataProviderOdsEmptyRows(): array { return [ 'remove empty columns' => [true], diff --git a/test/classes/Plugins/Transformations/TransformationPluginsTest.php b/test/classes/Plugins/Transformations/TransformationPluginsTest.php index 87a7bf0719..2dabd42450 100644 --- a/test/classes/Plugins/Transformations/TransformationPluginsTest.php +++ b/test/classes/Plugins/Transformations/TransformationPluginsTest.php @@ -67,7 +67,7 @@ class TransformationPluginsTest extends AbstractTestCase /** * Data provider for testGetMulti */ - public function multiDataProvider(): array + public static function multiDataProvider(): array { $GLOBALS['cfg']['CodemirrorEnable'] = false; @@ -726,7 +726,7 @@ class TransformationPluginsTest extends AbstractTestCase /** * Data provider for testTransformation */ - public function transformationDataProvider(): array + public static function transformationDataProvider(): array { $GLOBALS['cfg']['CodemirrorEnable'] = false; diff --git a/test/classes/PluginsTest.php b/test/classes/PluginsTest.php index 697d82e48a..667fec0988 100644 --- a/test/classes/PluginsTest.php +++ b/test/classes/PluginsTest.php @@ -79,7 +79,7 @@ class PluginsTest extends AbstractTestCase * @return array[] * @psalm-return array{array{string, string|int|null, string|null, 'Export'|'Import'|'Schema', string, bool|null}} */ - public function providerForTestGetDefault(): array + public static function providerForTestGetDefault(): array { return [ ['xml', 'xml', null, 'Export', 'format', null], diff --git a/test/classes/Query/CompatibilityTest.php b/test/classes/Query/CompatibilityTest.php index 51341c38a5..a3f9b8b7ea 100644 --- a/test/classes/Query/CompatibilityTest.php +++ b/test/classes/Query/CompatibilityTest.php @@ -25,7 +25,7 @@ class CompatibilityTest extends TestCase * @return array[] * @psalm-return array */ - public function providerForTestHasAccountLocking(): array + public static function providerForTestHasAccountLocking(): array { return [ 'MySQL 5.7.5' => [false, false, 50705], @@ -54,7 +54,7 @@ class CompatibilityTest extends TestCase * @return array[] * @psalm-return array */ - public function providerForTestIsUUIDSupported(): array + public static function providerForTestIsUUIDSupported(): array { return [ 'MySQL 5.7.5' => [false, false, 50705], diff --git a/test/classes/SanitizeTest.php b/test/classes/SanitizeTest.php index 8242733b7b..be54f5a656 100644 --- a/test/classes/SanitizeTest.php +++ b/test/classes/SanitizeTest.php @@ -71,7 +71,7 @@ class SanitizeTest extends AbstractTestCase * * @return array */ - public function docLinks(): array + public static function docLinks(): array { return [ [ @@ -214,7 +214,7 @@ class SanitizeTest extends AbstractTestCase * * @return array */ - public function variables(): array + public static function variables(): array { return [ [ @@ -273,7 +273,7 @@ class SanitizeTest extends AbstractTestCase * * @return array data for testEscape test case */ - public function escapeDataProvider(): array + public static function escapeDataProvider(): array { return [ [ @@ -327,7 +327,7 @@ class SanitizeTest extends AbstractTestCase * * @return array */ - public function dataProviderCheckLinks(): array + public static function dataProviderCheckLinks(): array { // Expected // The url diff --git a/test/classes/Server/Privileges/AccountLockingTest.php b/test/classes/Server/Privileges/AccountLockingTest.php index 09f6a6ac70..109e048260 100644 --- a/test/classes/Server/Privileges/AccountLockingTest.php +++ b/test/classes/Server/Privileges/AccountLockingTest.php @@ -14,6 +14,9 @@ use Throwable; */ class AccountLockingTest extends TestCase { + /** + * @requires PHPUnit < 10 + */ public function testLockWithValidAccount(): void { $dbi = $this->createMock(DatabaseInterface::class); @@ -33,6 +36,9 @@ class AccountLockingTest extends TestCase $accountLocking->lock('test.user', 'test.host'); } + /** + * @requires PHPUnit < 10 + */ public function testLockWithInvalidAccount(): void { $dbi = $this->createMock(DatabaseInterface::class); @@ -73,6 +79,9 @@ class AccountLockingTest extends TestCase $accountLocking->lock('test.user', 'test.host'); } + /** + * @requires PHPUnit < 10 + */ public function testUnlockWithValidAccount(): void { $dbi = $this->createMock(DatabaseInterface::class); @@ -92,6 +101,9 @@ class AccountLockingTest extends TestCase $accountLocking->unlock('test.user', 'test.host'); } + /** + * @requires PHPUnit < 10 + */ public function testUnlockWithInvalidAccount(): void { $dbi = $this->createMock(DatabaseInterface::class); diff --git a/test/classes/Server/PrivilegesTest.php b/test/classes/Server/PrivilegesTest.php index b028cfaf51..ebef31630d 100644 --- a/test/classes/Server/PrivilegesTest.php +++ b/test/classes/Server/PrivilegesTest.php @@ -1700,23 +1700,23 @@ class PrivilegesTest extends AbstractTestCase 'Z', $actual ); - $this->assertMatchesRegularExpression( + $this->assertMatchesRegularExpressionCompat( '/\s*-\s*<\/a>/', $actual ); - $this->assertMatchesRegularExpression( + $this->assertMatchesRegularExpressionCompat( '/\s*"\s*<\/a>/', $actual ); - $this->assertMatchesRegularExpression( + $this->assertMatchesRegularExpressionCompat( '/\s*%\s*<\/a>/', $actual ); - $this->assertMatchesRegularExpression( + $this->assertMatchesRegularExpressionCompat( '/\s*\\\\\s*<\/a>/', $actual ); - $this->assertMatchesRegularExpression( + $this->assertMatchesRegularExpressionCompat( '/\s*' . '' . preg_quote(__('Any')) . '<\/span>' . '\s*<\/a>/', @@ -1886,6 +1886,9 @@ class PrivilegesTest extends AbstractTestCase ); } + /** + * @requires PHPUnit < 10 + */ public function testGetUserPrivileges(): void { $mysqliResultStub = $this->createMock(mysqli_result::class); diff --git a/test/classes/Server/SelectTest.php b/test/classes/Server/SelectTest.php index 81e140b853..1c1f13a701 100644 --- a/test/classes/Server/SelectTest.php +++ b/test/classes/Server/SelectTest.php @@ -103,7 +103,7 @@ class SelectTest extends AbstractTestCase $this->assertStringContainsString($server['user'], $html); } - public function renderDataProvider(): array + public static function renderDataProvider(): array { return [ 'only options, don\'t omit fieldset' => [ diff --git a/test/classes/Server/SysInfo/SysInfoTest.php b/test/classes/Server/SysInfo/SysInfoTest.php index 897345e9c9..37d73cb21a 100644 --- a/test/classes/Server/SysInfo/SysInfoTest.php +++ b/test/classes/Server/SysInfo/SysInfoTest.php @@ -32,7 +32,7 @@ class SysInfoTest extends AbstractTestCase /** * Data provider for OS detection tests. */ - public function sysInfoOsProvider(): array + public static function sysInfoOsProvider(): array { return [ [ diff --git a/test/classes/Setup/FormProcessingTest.php b/test/classes/Setup/FormProcessingTest.php index 3d14f6e776..66dba10fdb 100644 --- a/test/classes/Setup/FormProcessingTest.php +++ b/test/classes/Setup/FormProcessingTest.php @@ -32,6 +32,8 @@ class FormProcessingTest extends AbstractNetworkTestCase /** * Test for process_formset() + * + * @requires PHPUnit < 10 */ public function testProcessFormSet(): void { diff --git a/test/classes/SqlTest.php b/test/classes/SqlTest.php index 7436f62dbb..bfe359931f 100644 --- a/test/classes/SqlTest.php +++ b/test/classes/SqlTest.php @@ -354,7 +354,7 @@ class SqlTest extends AbstractTestCase return $analyzedSqlResults; } - public function dataProviderCountQueryResults(): array + public static function dataProviderCountQueryResults(): array { // sql query // session tmpval diff --git a/test/classes/StorageEngineTest.php b/test/classes/StorageEngineTest.php index 85381fcf57..794e1bbd6a 100644 --- a/test/classes/StorageEngineTest.php +++ b/test/classes/StorageEngineTest.php @@ -122,7 +122,7 @@ class StorageEngineTest extends AbstractTestCase * * @return array */ - public function providerGetEngine(): array + public static function providerGetEngine(): array { return [ [ diff --git a/test/classes/Table/ColumnsDefinitionTest.php b/test/classes/Table/ColumnsDefinitionTest.php index e972a22b8a..6a4bee7432 100644 --- a/test/classes/Table/ColumnsDefinitionTest.php +++ b/test/classes/Table/ColumnsDefinitionTest.php @@ -35,7 +35,7 @@ class ColumnsDefinitionTest extends AbstractTestCase * @return array * @psalm-return array, array}> */ - public function providerColumnMetaDefault(): array + public static function providerColumnMetaDefault(): array { return [ 'when Default is null and Null is YES' => [ diff --git a/test/classes/Table/Maintenance/MessageTest.php b/test/classes/Table/Maintenance/MessageTest.php index 5b3ef75452..84dde10cf5 100644 --- a/test/classes/Table/Maintenance/MessageTest.php +++ b/test/classes/Table/Maintenance/MessageTest.php @@ -30,7 +30,7 @@ class MessageTest extends TestCase * @return array|string>> * @psalm-return array{mixed[], string, string, string, string}[] */ - public function providerForTestFromArray(): array + public static function providerForTestFromArray(): array { return [ [[], '', '', '', ''], diff --git a/test/classes/TableTest.php b/test/classes/TableTest.php index 6082c9b5cb..6de9da59e8 100644 --- a/test/classes/TableTest.php +++ b/test/classes/TableTest.php @@ -391,7 +391,7 @@ class TableTest extends AbstractTestCase /** * Data provider for name validation */ - public function dataValidateName(): array + public static function dataValidateName(): array { return [ [ diff --git a/test/classes/TemplateTest.php b/test/classes/TemplateTest.php index 6c915f42ba..5fa69b648f 100644 --- a/test/classes/TemplateTest.php +++ b/test/classes/TemplateTest.php @@ -67,7 +67,7 @@ class TemplateTest extends AbstractTestCase * * @return array */ - public function providerTestSet(): array + public static function providerTestSet(): array { return [ ['test/add_data'], @@ -96,7 +96,7 @@ class TemplateTest extends AbstractTestCase * * @return array */ - public function providerTestDynamicRender(): array + public static function providerTestDynamicRender(): array { return [ [ @@ -137,7 +137,7 @@ class TemplateTest extends AbstractTestCase * * @return array */ - public function providerTestRender(): array + public static function providerTestRender(): array { return [ [ @@ -169,7 +169,7 @@ class TemplateTest extends AbstractTestCase * * @return array */ - public function providerTestRenderGettext(): array + public static function providerTestRenderGettext(): array { return [ [ diff --git a/test/classes/ThemeTest.php b/test/classes/ThemeTest.php index a088b61a0f..4b335624f8 100644 --- a/test/classes/ThemeTest.php +++ b/test/classes/ThemeTest.php @@ -242,7 +242,7 @@ class ThemeTest extends AbstractTestCase * * @return array */ - public function providerForGetImgPath(): array + public static function providerForGetImgPath(): array { return [ [ diff --git a/test/classes/TrackerTest.php b/test/classes/TrackerTest.php index a642d4c2e8..4003445a83 100644 --- a/test/classes/TrackerTest.php +++ b/test/classes/TrackerTest.php @@ -117,7 +117,7 @@ class TrackerTest extends AbstractTestCase * * @return array Test data */ - public function getTableNameData(): array + public static function getTableNameData(): array { return [ [ @@ -189,6 +189,8 @@ class TrackerTest extends AbstractTestCase /** * Test for Tracker::createVersion() + * + * @requires PHPUnit < 10 */ public function testCreateVersion(): void { @@ -524,7 +526,7 @@ class TrackerTest extends AbstractTestCase * * @return array Test data */ - public function getTrackedDataProvider(): array + public static function getTrackedDataProvider(): array { $fetchArrayReturn = [ [ @@ -654,7 +656,7 @@ class TrackerTest extends AbstractTestCase * * @return array Test data */ - public function parseQueryData(): array + public static function parseQueryData(): array { // query // type diff --git a/test/classes/TransformationsTest.php b/test/classes/TransformationsTest.php index f5062a63a0..016a3f0a2f 100644 --- a/test/classes/TransformationsTest.php +++ b/test/classes/TransformationsTest.php @@ -60,7 +60,7 @@ class TransformationsTest extends AbstractTestCase /** * Data provided for parsing options */ - public function getOptionsData(): array + public static function getOptionsData(): array { return [ [ @@ -275,7 +275,7 @@ class TransformationsTest extends AbstractTestCase ); } - public function fixupData(): array + public static function fixupData(): array { return [ [ @@ -317,7 +317,7 @@ class TransformationsTest extends AbstractTestCase ); } - public function providerGetDescription(): array + public static function providerGetDescription(): array { return [ [ @@ -351,7 +351,7 @@ class TransformationsTest extends AbstractTestCase ); } - public function providerGetName(): array + public static function providerGetName(): array { return [ [ diff --git a/test/classes/TypesByDatabaseVersionTest.php b/test/classes/TypesByDatabaseVersionTest.php index 9b6017a482..940b7c0c4b 100644 --- a/test/classes/TypesByDatabaseVersionTest.php +++ b/test/classes/TypesByDatabaseVersionTest.php @@ -84,7 +84,7 @@ class TypesByDatabaseVersionTest extends AbstractTestCase * * @psalm-return array, array}> */ - public function providerFortTestGetFunctionsClass(): array + public static function providerFortTestGetFunctionsClass(): array { return [ 'mysql 5.1.0 - CHAR - not support INET6 Converter' => [ @@ -304,7 +304,7 @@ class TypesByDatabaseVersionTest extends AbstractTestCase * * @psalm-return array, array}> */ - public function providerFortTestGetFunctions(): array + public static function providerFortTestGetFunctions(): array { return [ 'mysql 5.1.0 - not support INET6 Converter' => [ @@ -380,7 +380,7 @@ class TypesByDatabaseVersionTest extends AbstractTestCase * * @psalm-return array, array}> */ - public function providerFortTestGetAllFunctions(): array + public static function providerFortTestGetAllFunctions(): array { return [ 'mysql 5.1.0 - not support INET6_ATON, ST_Geometry' => [ @@ -626,7 +626,7 @@ class TypesByDatabaseVersionTest extends AbstractTestCase * * @psalm-return array|string>}> */ - public function providerFortTestGetColumns(): array + public static function providerFortTestGetColumns(): array { return [ 'mysql 5.1.0 - not support INET6, JSON and UUID' => [ diff --git a/test/classes/TypesTest.php b/test/classes/TypesTest.php index c39d50e9e4..6148586614 100644 --- a/test/classes/TypesTest.php +++ b/test/classes/TypesTest.php @@ -172,7 +172,7 @@ class TypesTest extends AbstractTestCase * * @return array data for testGetTypeOperators */ - public function providerForGetTypeOperators(): array + public static function providerForGetTypeOperators(): array { return [ [ @@ -274,7 +274,7 @@ class TypesTest extends AbstractTestCase * * @return array test data for getTypeOperatorsHtml */ - public function providerForTestGetTypeOperatorsHtml(): array + public static function providerForTestGetTypeOperatorsHtml(): array { return [ [ @@ -317,7 +317,7 @@ class TypesTest extends AbstractTestCase * * @return array */ - public function providerForTestGetTypeDescription(): array + public static function providerForTestGetTypeDescription(): array { return [ ['TINYINT'], @@ -382,7 +382,7 @@ class TypesTest extends AbstractTestCase /** * Data provider for testing function lists */ - public function providerFortTestGetFunctionsClass(): array + public static function providerFortTestGetFunctionsClass(): array { return [ [ @@ -812,7 +812,7 @@ class TypesTest extends AbstractTestCase * * @return array for testing type detection */ - public function providerFortTestGetTypeClass(): array + public static function providerFortTestGetTypeClass(): array { return [ [ diff --git a/test/classes/UrlTest.php b/test/classes/UrlTest.php index 9f27832a7d..573ee388ee 100644 --- a/test/classes/UrlTest.php +++ b/test/classes/UrlTest.php @@ -218,7 +218,7 @@ class UrlTest extends AbstractTestCase $this->assertSame('0', $queryParams['pos']); $this->assertTrue(is_string($queryParams['eq'])); $this->assertNotSame('', $queryParams['eq']); - $this->assertMatchesRegularExpression('/^[a-zA-Z0-9-_=]+$/', $queryParams['eq']); + $this->assertMatchesRegularExpressionCompat('/^[a-zA-Z0-9-_=]+$/', $queryParams['eq']); $decrypted = Url::decryptQuery($queryParams['eq']); $this->assertNotNull($decrypted); @@ -241,7 +241,7 @@ class UrlTest extends AbstractTestCase $encrypted = Url::encryptQuery($query); $this->assertNotSame($query, $encrypted); $this->assertNotSame('', $encrypted); - $this->assertMatchesRegularExpression('/^[a-zA-Z0-9-_=]+$/', $encrypted); + $this->assertMatchesRegularExpressionCompat('/^[a-zA-Z0-9-_=]+$/', $encrypted); $decrypted = Url::decryptQuery($encrypted); $this->assertSame($query, $decrypted); diff --git a/test/classes/UserPasswordTest.php b/test/classes/UserPasswordTest.php index 1486cb785d..0bf2a7bead 100644 --- a/test/classes/UserPasswordTest.php +++ b/test/classes/UserPasswordTest.php @@ -56,7 +56,7 @@ class UserPasswordTest extends AbstractTestCase /** * @psalm-return array{0: bool, 1: Message, 2: string, 3: string, 4: string}[] */ - public function providerSetChangePasswordMsg(): array + public static function providerSetChangePasswordMsg(): array { return [ [false, Message::success('The profile has been updated.'), '1', '', ''], diff --git a/test/classes/UtilTest.php b/test/classes/UtilTest.php index 772bf70e2a..b15530a554 100644 --- a/test/classes/UtilTest.php +++ b/test/classes/UtilTest.php @@ -290,7 +290,7 @@ class UtilTest extends AbstractTestCase * * @return array, array{string, bool, array}}> */ - public function providerGetUniqueConditionForGroupFlag(): array + public static function providerGetUniqueConditionForGroupFlag(): array { return [ 'field type is integer, value is number - not escape string' => [ @@ -432,7 +432,7 @@ class UtilTest extends AbstractTestCase * * @return array test data */ - public function charsetQueryData(): array + public static function charsetQueryData(): array { return [ [ @@ -546,7 +546,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerConvertBitDefaultValue(): array + public static function providerConvertBitDefaultValue(): array { return [ [ @@ -589,7 +589,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerUnEscapeMysqlWildcards(): array + public static function providerUnEscapeMysqlWildcards(): array { return [ [ @@ -698,7 +698,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerExpandUserString(): array + public static function providerExpandUserString(): array { return [ [ @@ -751,7 +751,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerExtractColumnSpec(): array + public static function providerExtractColumnSpec(): array { return [ [ @@ -910,7 +910,7 @@ class UtilTest extends AbstractTestCase * * @return iterable */ - public function providerParseEnumSetValues(): iterable + public static function providerParseEnumSetValues(): iterable { $enumSpec = "enum('a&b','b''c''d','e\\f')"; @@ -1031,7 +1031,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerExtractValueFromFormattedSize(): array + public static function providerExtractValueFromFormattedSize(): array { return [ [ @@ -1076,7 +1076,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerFormatByteDown(): array + public static function providerFormatByteDown(): array { return [ [ @@ -1323,7 +1323,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerFormatNumber(): array + public static function providerFormatNumber(): array { return [ [ @@ -1459,7 +1459,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerGetFormattedMaximumUploadSize(): array + public static function providerGetFormattedMaximumUploadSize(): array { return [ [ @@ -1538,7 +1538,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerGetTitleForTarget(): array + public static function providerGetTitleForTarget(): array { return [ [ @@ -1601,7 +1601,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerLocalisedDate(): array + public static function providerLocalisedDate(): array { $hasJaTranslations = file_exists(LOCALE_PATH . '/cs/LC_MESSAGES/phpmyadmin.mo'); @@ -1734,7 +1734,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerTimespanFormat(): array + public static function providerTimespanFormat(): array { return [ [ @@ -1770,7 +1770,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerPrintableBitValue(): array + public static function providerPrintableBitValue(): array { return [ [ @@ -1807,7 +1807,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerUnQuote(): array + public static function providerUnQuote(): array { return [ [ @@ -1850,7 +1850,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerUnQuoteSelectedChar(): array + public static function providerUnQuoteSelectedChar(): array { return [ [ @@ -1887,7 +1887,7 @@ class UtilTest extends AbstractTestCase /** * @return array[] */ - public function providerForTestBackquote(): array + public static function providerForTestBackquote(): array { return [ [ @@ -1968,7 +1968,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerUserDir(): array + public static function providerUserDir(): array { return [ [ @@ -2003,7 +2003,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerDuplicateFirstNewline(): array + public static function providerDuplicateFirstNewline(): array { return [ [ @@ -2061,7 +2061,7 @@ class UtilTest extends AbstractTestCase * * @return array */ - public function providerIsInteger(): array + public static function providerIsInteger(): array { return [ [ @@ -2109,7 +2109,7 @@ class UtilTest extends AbstractTestCase * @source https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded MDN docs * @source https://www.nginx.com/resources/wiki/start/topics/examples/forwarded/ Nginx docs */ - public function providerForwardedHeaders(): array + public static function providerForwardedHeaders(): array { return [ [ @@ -2262,6 +2262,9 @@ class UtilTest extends AbstractTestCase $GLOBALS['dbi'] = $oldDbi; } + /** + * @requires PHPUnit < 10 + */ public function testCurrentUserHasNotUserPrivilegeButDbPrivilege(): void { $dbi = $this->getMockBuilder(DatabaseInterface::class) @@ -2293,6 +2296,9 @@ class UtilTest extends AbstractTestCase $GLOBALS['dbi'] = $oldDbi; } + /** + * @requires PHPUnit < 10 + */ public function testCurrentUserHasNotUserPrivilegeAndNotDbPrivilege(): void { $dbi = $this->getMockBuilder(DatabaseInterface::class) @@ -2324,6 +2330,9 @@ class UtilTest extends AbstractTestCase $GLOBALS['dbi'] = $oldDbi; } + /** + * @requires PHPUnit < 10 + */ public function testCurrentUserHasNotUserPrivilegeAndNotDbPrivilegeButTablePrivilege(): void { $dbi = $this->getMockBuilder(DatabaseInterface::class) @@ -2360,6 +2369,9 @@ class UtilTest extends AbstractTestCase $GLOBALS['dbi'] = $oldDbi; } + /** + * @requires PHPUnit < 10 + */ public function testCurrentUserHasNotUserPrivilegeAndNotDbPrivilegeAndNotTablePrivilege(): void { $dbi = $this->getMockBuilder(DatabaseInterface::class) @@ -2399,7 +2411,7 @@ class UtilTest extends AbstractTestCase /** * @return array[] */ - public function dataProviderScriptNames(): array + public static function dataProviderScriptNames(): array { // target // location @@ -2604,7 +2616,7 @@ class UtilTest extends AbstractTestCase * @return array * @psalm-return array */ - public function provideForTestIsUUIDSupported(): array + public static function provideForTestIsUUIDSupported(): array { return [ [ diff --git a/test/classes/Utils/ForeignKeyTest.php b/test/classes/Utils/ForeignKeyTest.php index e792de8985..a78246d6fa 100644 --- a/test/classes/Utils/ForeignKeyTest.php +++ b/test/classes/Utils/ForeignKeyTest.php @@ -36,7 +36,7 @@ class ForeignKeyTest extends AbstractTestCase * * @return array */ - public function providerIsSupported(): array + public static function providerIsSupported(): array { return [ ['MyISAM', false], @@ -69,7 +69,7 @@ class ForeignKeyTest extends AbstractTestCase /** * @return array[] */ - public function providerCheckInit(): array + public static function providerCheckInit(): array { return [ ['', 'OFF'], @@ -129,7 +129,7 @@ class ForeignKeyTest extends AbstractTestCase /** * @return array[] */ - public function providerCheckCleanup(): array + public static function providerCheckCleanup(): array { return [ [true, 'ON'], diff --git a/test/classes/Utils/FormatConverterTest.php b/test/classes/Utils/FormatConverterTest.php index 4d43fbc4a5..2f4712fab0 100644 --- a/test/classes/Utils/FormatConverterTest.php +++ b/test/classes/Utils/FormatConverterTest.php @@ -34,7 +34,7 @@ class FormatConverterTest extends AbstractTestCase * * @return array */ - public function providerBinaryToIp(): array + public static function providerBinaryToIp(): array { // expected // input @@ -102,7 +102,7 @@ class FormatConverterTest extends AbstractTestCase * * @return array */ - public function providerIpToBinary(): array + public static function providerIpToBinary(): array { return [ [ @@ -135,7 +135,7 @@ class FormatConverterTest extends AbstractTestCase * * @return array */ - public function providerIpToLong(): array + public static function providerIpToLong(): array { return [ [ @@ -168,7 +168,7 @@ class FormatConverterTest extends AbstractTestCase * * @return array */ - public function providerLongToIp(): array + public static function providerLongToIp(): array { return [ [ diff --git a/test/classes/Utils/GisTest.php b/test/classes/Utils/GisTest.php index d30cf24d62..2321054ffa 100644 --- a/test/classes/Utils/GisTest.php +++ b/test/classes/Utils/GisTest.php @@ -65,7 +65,7 @@ class GisTest extends AbstractTestCase )); } - public function providerConvertToWellKnownText(): array + public static function providerConvertToWellKnownText(): array { return [ [ diff --git a/test/classes/Utils/HttpRequestTest.php b/test/classes/Utils/HttpRequestTest.php index 3824aa15e8..d9194fda21 100644 --- a/test/classes/Utils/HttpRequestTest.php +++ b/test/classes/Utils/HttpRequestTest.php @@ -201,7 +201,7 @@ class HttpRequestTest extends AbstractTestCase /** * Data provider for HTTP tests */ - public function httpRequests(): array + public static function httpRequests(): array { return [ [ diff --git a/test/classes/VersionInformationTest.php b/test/classes/VersionInformationTest.php index 5d26fbb954..d5a100e187 100644 --- a/test/classes/VersionInformationTest.php +++ b/test/classes/VersionInformationTest.php @@ -89,7 +89,7 @@ class VersionInformationTest extends AbstractTestCase /** * Data provider for version parsing */ - public function dataVersions(): array + public static function dataVersions(): array { return [ [ @@ -173,6 +173,8 @@ class VersionInformationTest extends AbstractTestCase /** * Tests getLatestCompatibleVersion() when there is only one server configured + * + * @requires PHPUnit < 10 */ public function testGetLatestCompatibleVersionWithSingleServer(): void { @@ -206,6 +208,8 @@ class VersionInformationTest extends AbstractTestCase /** * Tests getLatestCompatibleVersion() when there are multiple servers configured + * + * @requires PHPUnit < 10 */ public function testGetLatestCompatibleVersionWithMultipleServers(): void { @@ -233,6 +237,8 @@ class VersionInformationTest extends AbstractTestCase /** * Tests getLatestCompatibleVersion() with an old PHP version + * + * @requires PHPUnit < 10 */ public function testGetLatestCompatibleVersionWithOldPHPVersion(): void { @@ -268,6 +274,7 @@ class VersionInformationTest extends AbstractTestCase * @param string|null $matchedLastVersion The version that will be matched * * @dataProvider dataProviderVersionConditions + * @requires PHPUnit < 10 */ public function testGetLatestCompatibleVersionWithNewPHPVersion( array $versions, @@ -306,7 +313,7 @@ class VersionInformationTest extends AbstractTestCase * * @return array[] */ - public function dataProviderVersionConditions(): array + public static function dataProviderVersionConditions(): array { return [ [ diff --git a/test/classes/WebAuthn/CBORDecoderTest.php b/test/classes/WebAuthn/CBORDecoderTest.php index f43e43a25e..c426da2809 100644 --- a/test/classes/WebAuthn/CBORDecoderTest.php +++ b/test/classes/WebAuthn/CBORDecoderTest.php @@ -36,7 +36,7 @@ class CBORDecoderTest extends TestCase /** * @psalm-return iterable */ - public function dataProviderForTestDecode(): iterable + public static function dataProviderForTestDecode(): iterable { return [ ['00', 0], @@ -178,7 +178,7 @@ class CBORDecoderTest extends TestCase /** * @psalm-return iterable */ - public function indefiniteLengthValuesProvider(): iterable + public static function indefiniteLengthValuesProvider(): iterable { return [ ['5f42010243030405ff'], // (_ h'0102', h'030405') diff --git a/test/classes/ZipExtensionTest.php b/test/classes/ZipExtensionTest.php index 1468c1db62..939f8ad3f0 100644 --- a/test/classes/ZipExtensionTest.php +++ b/test/classes/ZipExtensionTest.php @@ -48,7 +48,7 @@ class ZipExtensionTest extends AbstractTestCase * * @return array */ - public function provideTestGetContents(): array + public static function provideTestGetContents(): array { return [ 'null as specific entry' => [ @@ -100,7 +100,7 @@ class ZipExtensionTest extends AbstractTestCase * * @return array Test data */ - public function provideTestFindFile(): array + public static function provideTestFindFile(): array { return [ [ diff --git a/test/selenium/ExportTest.php b/test/selenium/ExportTest.php index ffa7ef8fad..426fd1e3b1 100644 --- a/test/selenium/ExportTest.php +++ b/test/selenium/ExportTest.php @@ -91,7 +91,7 @@ class ExportTest extends TestBase /** * Data provider for testServerExport */ - public function exportDataProvider(): array + public static function exportDataProvider(): array { return [ [