Maurício Meneghini Fauth
40b167a5d0
Merge branch 'QA_5_2'
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.com.br >
2026-09-19 14:22:17 -03:00
Kamil Tekiela
ccc28ce3fa
Add tests for getDbInfo table group filtering
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com >
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com >
2026-09-16 15:40:43 +01:00
Kamil Tekiela
21e133ebc0
Stop pinning table group to the top
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com >
2026-09-16 15:40:43 +01:00
Kamil Tekiela
a149087626
Fix bug when fetching table groups
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com >
2026-09-16 15:28:54 +01:00
Kamil Tekiela
9b0cc2548e
Refactoring of getTablesFull
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com >
2026-09-16 15:28:54 +01:00
Kamil Tekiela
cb7a87d115
Introduce TableType enum for table list type filtering
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com >
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-09-16 15:28:54 +01:00
Kamil Tekiela
9b9ed5485b
Fix table list position handling in Database StructureController
...
Clamp negative pos parameters to 0 in getTableListPosition(); a
negative value used to be stored in the session and end up as a
negative array_slice() offset or an invalid negative SQL OFFSET.
Redirect to the last page when the position is exactly equal to the
total number of tables: such a page is empty, but the previous check
only redirected when the position was strictly greater, rendering an
empty table list for a non-empty database.
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com >
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-09-16 15:28:54 +01:00
Kamil Tekiela
fbf5158b2b
Remove the position field from Database StructureController
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com >
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-09-16 15:28:54 +01:00
Kamil Tekiela
c7f37ee42f
Refactor StructureController::getDbInfo() and expand its test coverage
...
Add unit tests for the previously untested paths of getDbInfo(): sort
name mapping (including descending order and unknown sort columns),
the tbl_group and tbl_type filters, and MaxTableList paging.
Refactor getDbInfo() into three flat branches, replacing the
string|false $groupWithSeparator juggling and the duplicated string
checks. The sort name is now mapped with a match expression. The paging
position is passed as an explicit parameter instead of being read from
a private field, and the total table count is always returned as an int
instead of int|null, so the caller no longer needs a fallback count.
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com >
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-09-16 15:28:53 +01:00
Maurício Meneghini Fauth
28cd3776d2
Merge branch 'QA_5_2'
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.com.br >
2026-07-31 18:15:28 -03:00
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
b93e747994
Remove method AbstractTestCase::callFunction()
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net >
2026-02-21 18:01:03 -03: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
Kamil Tekiela
e67fe1b145
Execute getTableListPosition only once
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com >
2025-12-11 00:19:20 +00:00
Kamil Tekiela
b7327d6944
Move request params out of the method
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com >
2025-12-11 00:19:20 +00:00
Kamil Tekiela
7e57731a92
Move getDbInfo()
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com >
2025-12-11 00:19:18 +00:00
Maurício Meneghini Fauth
1a25a06d0d
Replace Config::getInstance with DI in controllers
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net >
2025-05-01 21:51:43 -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
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