Commit Graph

31 Commits

Author SHA1 Message Date
Kamil Tekiela
f708e074c9
Clean up config again (#20264)
* MaxTableList/MaxDbList/QueryHistoryMax
* UserprefsDisallow
* NaturalOrder
* Update TableTest.php
* MaxExactCountViews
* Update ReplicationGuiTest.php
* Update RoutinesTest.php
* Update StructureControllerTest.php
* Update ExportControllerTest.php
* Update StructureControllerTest.php
* Update BookmarkTest.php
* MaxCharactersInDisplayedSQL
* ActionLinksMode/ShowSQL/MysqlSslWarningSafeHosts
* Update TwoFactorTest.php
* ForeignKeyMaxLimit/ForeignKeyDropdownOrder
* QueryHistoryDB
* ZeroConf
* UseDbSearch
* MaxRoutineList
* NumFavoriteTables
* EnableAutocompleteForTablesAndColumns
* MaxExactCount/ShowStats
* InitialSlidersState
* Remove isset in Results
* Remove isset and fix tests
* PmaNoRelation_DisableWarning
* ShowCreateDb
* Update phpstan-baseline.neon
* Navigation
* Upgrading vimeo/psalm (6.15.0 => 6.16.1)

---------

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2026-04-10 16:33:08 -03:00
Maurício Meneghini Fauth
e0748802af
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2026-03-30 11:52:26 -03:00
Maurício Meneghini Fauth
495a4d031e
Extract ResponseRenderer dependency from Privileges class
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2026-02-26 15:34:21 -03:00
Maurício Meneghini Fauth
61b0a72387
Refactor Privileges::getDataForChangeOrCopyUser()
Extracts ResponseRenderer dependency and $_POST param.

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2026-02-23 14:53:19 -03:00
Kamil Tekiela
3c3fb32237 Fix LimitChars
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2026-02-19 21:55:05 +00:00
Maurício Meneghini Fauth
2dabc839b3
Extract Config dependency from Template class
Uses DI instead.

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2026-02-11 22:51:02 -03:00
Maurício Meneghini Fauth
ea6cd0770d
Extract dependency from Util::getServerType()
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2026-01-30 17:19:58 -03:00
Kamil Tekiela
ccedadae8e Convert settings to config
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2026-01-09 00:31:24 +00:00
Kamil Tekiela
c7fc7441b0 Convert settings to config
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2026-01-09 00:16:37 +00:00
Kamil Tekiela
829f0f2140 Convert settings to config
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2026-01-09 00:16:37 +00:00
Maurício Meneghini Fauth
7567aecd73
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2025-10-17 10:20:27 -03:00
Kamil Tekiela
1e66018a6e
DataProvider types
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2025-10-12 20:06:00 -03:00
Maurício Meneghini Fauth
44bcf98a43
Extract string constants from RelationParameters class
These strings are very similar to some Config\Settings\Server
properties, so is better to avoid confusion.

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2025-08-05 18:26:40 -03:00
Kamil Tekiela
b62ffe17c7 Merge the logic into Settings
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2025-01-16 19:31:50 +00:00
Maurício Meneghini Fauth
3e5934ef80
Fix failing tests
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2025-01-11 15:06:14 -03:00
Maurício Meneghini Fauth
d253986eb5
Remove hostname global variable
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2025-01-07 19:01:14 -03:00
Maurício Meneghini Fauth
a01fed10cf
Remove username global variable
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2025-01-07 18:37:36 -03:00
Kamil Tekiela
326da8369f Implement executeQuery
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2025-01-01 19:53:50 +00:00
Maurício Meneghini Fauth
5548f8fe5b
Replace lang global var with Current::$lang prop
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2024-12-24 12:01:03 -03:00
Kamil Tekiela
8015e4de72 Move DatabaseInterface to Dbal
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2024-12-22 18:34:53 +00:00
Kamil Tekiela
a722ccff8c Add $dbname as param to getExtraDataForAjaxBehavior
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2024-11-13 14:40:16 -03:00
Kamil Tekiela
e9c2eea461 Unwrap getDataForDBInfo() into separate methods
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2024-11-13 14:40:16 -03:00
Kamil Tekiela
85b476769c Refactor getDataForDBInfo
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2024-11-13 14:40:16 -03:00
Kamil Tekiela
281321ed7f Extract getHostname
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2024-11-13 14:40:16 -03:00
Kamil Tekiela
a22ab3ac3f Move the first condition out of addUser
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2024-11-13 14:40:16 -03:00
Jacek Barecki
003f092277
Fix #17262 - Add warning when setting a password to a blank value if AllowNoPassword is false (#19315)
* Fix #17262 - Add warning when setting a password to a blank value if AllowNoPassword is false

Closes #17262

Signed-off-by: Jacek Barecki <jacek.barecki@gmail.com>
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2024-10-11 14:35:11 -03:00
Maurício Meneghini Fauth
2c597e3f79
Fix compatibility with PHPUnit 11
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2024-08-29 13:51:46 -03:00
Maurício Meneghini Fauth
90ee00efd5
Create the 'pma' global variable for Twig templates
Creates the Twig\PmaGlobalVariable class to handle the 'pma' Twig global
variable.

The idea of this global variable is to automatically inject in all
templates some useful information.

For now it only includes `pma.version` to get the phpMyAdmin version
and `pma.text_dir` to get the text direction ('ltr' or 'rtl').

Adding new variables to the `pma` global variable should be done with
caution.

- https://twig.symfony.com/doc/3.x/advanced.html#globals

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-07-09 20:30:48 -03:00
Kamil Tekiela
82c85d26c0
Clean up of tests (#19067)
* Fix wrong type hint

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Use $this instead of parent

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* setUp should be a protected method

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* onNotSuccessfulTest should be protected

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* $command doesn't need to be a property

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Give alertText() proper return type

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Use null-safe operator

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Call Message static constructors statically

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Call StorageEngine methods statically

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Add better type hints in PrivilegesController

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Use packed (without keys) arrays in tests

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Use type casts instead of function casts

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Use const instead of private property

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Use const instead of private property

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Fix testAuthFailsTooLongPass()

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Replace loop with array_shift

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Use ob_get_clean

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Remove duplicated code

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Use assert instead of phpdoc

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

---------

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2024-03-20 13:34:55 -03:00
Kamil Tekiela
7ed4a092be Remove more unnecessary asserts
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2024-03-18 21:24:40 +01:00
Maurício Meneghini Fauth
606f66b5df
Rename tests/classes to tests/unit
This directory is for unit tests only, so let's rename it to unit to be
more clear.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2024-02-23 13:29:07 -03:00