Commit Graph

128 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
e8c216b17e
Fix PHP 8.5 Reflection*::setAccessible() deprecations
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2025-08-17 13:32:00 -03:00
William Desportes
0d961a4888
The tests testBlowfishWithInvalidSecret and testBlowfishWithValidSecret need zip and bz2 PHP exts
Or assertArrayNotHasKey('error', $messages) does not PASS.
Found this on a new PHP 8.4 setup without zip and bz2.

Signed-off-by: William Desportes <williamdes@wdes.fr>
2024-12-21 15:06:14 +01:00
Maurício Meneghini Fauth
555ea56cbd
Make PHPUnit's assertions stricter
Backports #18993 to QA_5_2.

This makes merging QA_5_2 into master easier.

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2024-10-12 15:33:45 -03:00
Maurício Meneghini Fauth
7fc96d6621
Call PHPUnit static methods using static calls
Backports #18907 to QA_5_2.

This makes merging QA_5_2 into master easier.
Changes done using Rector.

- #18907

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2024-10-12 14:28:22 -03:00
Maurício Meneghini Fauth
46f2c8871c
Backport some fixes for PHPUnit 10 compatibility
- Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1070623

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2024-08-13 20:13:18 -03:00
Maximilian Krög
1df32b32e0
Backport two test methods for phpunit 8.5
Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
2023-09-09 17:44:13 +02:00
Scott Mcgowan
6fc1401ee2
Fix column names option for CSV Export
Previously work was done to enable column names in CSV exports by
default. This change actually ended up overwriting the column name value
so that column names were included in all exports regardless of whether
or not the property was disabled. This commit changes the default for
column names to enabled as the original change intended, and removes
the property overwrite.

Signed-off-by: Scott McGowan mcgowanscott16@gmail.com
2022-11-25 21:15:49 +01:00
Maurício Meneghini Fauth
5d4884d294
Update setup page to generate better blowfish_secret keys
Instead of generating a printable string, it generates a binary string
and converts it to an hexadecimal string.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-09-26 17:33:38 -03:00
Maurício Meneghini Fauth
9b3a1f7734
Merge branch 'QA_5_1-security' into master-security
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-01-13 17:41:16 -03:00
Maurício Meneghini Fauth
5118acce1d
Escape config-form's action attribute
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-01-13 10:34:47 -03:00
Maurício Meneghini Fauth
0bee94b27e
Merge branch 'QA_5_1-security' into master-security
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-01-11 14:31:56 -03:00
Maurício Meneghini Fauth
44fe103b9c
Remove @access annotations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-22 11:43:45 -03:00
Kamil Tekiela
488e7cb5bf Use array_keys whenever only keys are needed in foreach
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-11-29 20:37:39 +00:00
Maurício Meneghini Fauth
67e96cf40c
Get default config values from Config\Settings classes
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-30 12:04:47 -03:00
Maurício Meneghini Fauth
3e0856c77b
Remove useless string concatenations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-27 21:40:22 -03:00
Maurício Meneghini Fauth
e96b75bb92
Replace class strings with the ::class constant
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-27 19:17:45 -03:00
Maurício Meneghini Fauth
229d8dfb5e
Extract Console, Debug and SqlQueryBox classes from Settings
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-19 13:17:32 -03:00
Maurício Meneghini Fauth
73034e43e1
Extract setter methods from Config\Settings classes
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-18 12:44:48 -03:00
Maurício Meneghini Fauth
f00d70cccb
Remove useless whitespaces
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-15 17:05:40 -03:00
Maurício Meneghini Fauth
04d3c83559
Fix some errors found by PHPStan/Psalm
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-08-05 16:09:08 -03:00
Maurício Meneghini Fauth
229767bc30
Add more tests for Config\Settings classes
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-08-02 19:29:45 -03:00
Maurício Meneghini Fauth
fa92760002
Add tests for Config\Settings\Export class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-31 15:59:24 -03:00
Maurício Meneghini Fauth
437bd7c974
Create Settings value object for $cfg global
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-31 15:59:24 -03:00
Maurício Meneghini Fauth
355f6d9d20
Remove PhpMyAdmin\Config::enableBc method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-09 13:59:04 -03:00
Maurício Meneghini Fauth
21431578db
Fix some errors found by PHPStan and Psalm
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-24 18:03:14 -03:00
Maurício Meneghini Fauth
f3b79d83c0
Add PHPUnit's Covers annotation on test classes
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-04 23:39:26 -03:00
Maurício Meneghini Fauth
a7d6df17d6
Remove warnings from PHPUnit
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-04-09 13:28:47 -03:00
Maurício Meneghini Fauth
33d711215d
Remove the PMA_VERSION constant
Uses the PhpMyAdmin\Version::VERSION constant instead.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-08 22:22:55 -03:00
Maurício Meneghini Fauth
7e33d227f5
Rename the PMA_Config global variable to config
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-08 15:03:12 -03:00
Maurício Meneghini Fauth
d83abf63e7
Use PSR-12 for control structures spacing
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-05 15:27:03 -03:00
Maurício Meneghini Fauth
0b8edc5bde
Use PSR-12 for namespace use statements
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-05 14:18:35 -03:00
William Desportes
76803f9422
Replace deprecated ->setMethods by ->onlyMethods
See: https://github.com/sebastianbergmann/phpunit/pull/3687
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-03-04 23:24:25 +01:00
Maurício Meneghini Fauth
53f5247811
Merge FormDisplay::getDisplay templates
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-01-05 19:25:21 -03:00
Maurício Meneghini Fauth
d8c1d6e7a1
Extract HTML from FormDisplayTemplate::displayInput
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-01-03 18:25:14 -03:00
Maurício Meneghini Fauth
65dd7e8278
Wrap settings tabs with Bootstrap's cards
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-01-02 18:51:11 -03:00
Maurício Meneghini Fauth
c9ab66170a
Replace Settings page tabs with Bootstrap's tabs
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-12-30 23:20:40 -03:00
Maurício Meneghini Fauth
5178f76f95
Move fieldset CSS style to the .pma-fieldset class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-12-28 19:46:40 -03:00
Maurício Meneghini Fauth
b43e351668
Fix broken tests related to #16486
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-11-16 21:35:04 -03:00
William Desportes
50e900a1bf
Remove all @test annotations
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-11-08 23:01:26 +01:00
Maurício Meneghini Fauth
db3da81056 Remove some useless comments
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-13 19:56:56 -03:00
Maurício Meneghini Fauth
e66be179ca Use camel case naming for class members
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-05 10:37:07 -03:00
Maurício Meneghini Fauth
ceac762e09 Remove pmaThemePath and pmaThemeImage PHP globals
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-02 10:57:57 -03:00
Maurício Meneghini Fauth
ba09c84a05 Fix PHPStan errors for PHPUnit assert methods
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-10 16:20:53 -03:00
William Desportes
cce4bc993c
Fixes #16278 - Fix tests
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-08-06 15:48:08 +02:00
William Desportes
a80153a633
Add typehints using phpcbf on test/*
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-07-17 22:52:42 +02:00
Maurício Meneghini Fauth
652c55a5ef Remove Config\PageSettings::getNaviSettings method
Related to https://github.com/phpmyadmin/phpmyadmin/issues/16258.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-12 17:40:19 -03:00
Maurício Meneghini Fauth
f8320956ee Remove Config\PageSettings::showGroup method
Related to https://github.com/phpmyadmin/phpmyadmin/issues/16258.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-12 16:01:18 -03:00
Maurício Meneghini Fauth
47f0960dce Add return type declaration to test methods
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-07 11:31:33 -03:00
Maurício Meneghini Fauth
e81146e4b3 Remove useless return annotations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-07 10:30:27 -03:00
William Desportes
3f0b7390e2
Fix documentation after removing _ from private methods
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-06-02 23:56:48 +02:00