Skip to content

Commit f43da40

Browse files
Merge pull request #18856 from kamil-tekiela/getTablesFull
Refactoring of getTablesFull and Query/Cache
2 parents 597d2ee + cfe8844 commit f43da40

15 files changed

Lines changed: 62 additions & 383 deletions

File tree

app/services_controllers.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,6 +1576,7 @@
15761576
'$transformations' => '@transformations',
15771577
'$relation' => '@relation',
15781578
'$dbi' => '@dbi',
1579+
'$dbTableExists' => '@' . DbTableExists::class,
15791580
],
15801581
],
15811582
UserPasswordController::class => [

phpstan-baseline.neon

Lines changed: 15 additions & 215 deletions
Original file line numberDiff line numberDiff line change
@@ -3402,7 +3402,7 @@ parameters:
34023402

34033403
-
34043404
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
3405-
count: 10
3405+
count: 9
34063406
path: src/Controllers/Operations/TableController.php
34073407

34083408
-
@@ -5967,7 +5967,7 @@ parameters:
59675967

59685968
-
59695969
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
5970-
count: 4
5970+
count: 2
59715971
path: src/Controllers/Table/StructureController.php
59725972

59735973
-
@@ -6880,16 +6880,6 @@ parameters:
68806880
count: 3
68816881
path: src/Database/Designer/Common.php
68826882

6883-
-
6884-
message: "#^Cannot access offset 'ENGINE' on mixed\\.$#"
6885-
count: 5
6886-
path: src/Database/Designer/Common.php
6887-
6888-
-
6889-
message: "#^Cannot access offset 'TABLE_NAME' on mixed\\.$#"
6890-
count: 2
6891-
path: src/Database/Designer/Common.php
6892-
68936883
-
68946884
message: "#^Cannot access offset 'constraint' on mixed\\.$#"
68956885
count: 1
@@ -6985,23 +6975,18 @@ parameters:
69856975
count: 2
69866976
path: src/Database/Designer/Common.php
69876977

6988-
-
6989-
message: "#^Parameter \\#1 \\$string of function mb_strtoupper expects string, mixed given\\.$#"
6990-
count: 4
6991-
path: src/Database/Designer/Common.php
6992-
69936978
-
69946979
message: "#^Parameter \\#1 \\$string of function rawurlencode expects string, mixed given\\.$#"
69956980
count: 4
69966981
path: src/Database/Designer/Common.php
69976982

69986983
-
6999-
message: "#^Parameter \\#2 \\$table of method PhpMyAdmin\\\\ConfigStorage\\\\Relation\\:\\:getDisplayField\\(\\) expects string, mixed given\\.$#"
6984+
message: "#^Parameter \\#2 \\$table of method PhpMyAdmin\\\\ConfigStorage\\\\Relation\\:\\:getDisplayField\\(\\) expects string, int\\|string\\|null given\\.$#"
70006985
count: 1
70016986
path: src/Database/Designer/Common.php
70026987

70036988
-
7004-
message: "#^Parameter \\#2 \\$tableName of class PhpMyAdmin\\\\Database\\\\Designer\\\\DesignerTable constructor expects string, mixed given\\.$#"
6989+
message: "#^Parameter \\#2 \\$tableName of class PhpMyAdmin\\\\Database\\\\Designer\\\\DesignerTable constructor expects string, int\\|string\\|null given\\.$#"
70056990
count: 1
70066991
path: src/Database/Designer/Common.php
70076992

@@ -7355,6 +7340,11 @@ parameters:
73557340
count: 1
73567341
path: src/Database/Search.php
73577342

7343+
-
7344+
message: "#^Binary operation \"\\+\" between int\\|string\\|null and int\\|string\\|null results in an error\\.$#"
7345+
count: 3
7346+
path: src/DatabaseInterface.php
7347+
73587348
-
73597349
message: "#^Binary operation \"\\+\" between string\\|null and string\\|null results in an error\\.$#"
73607350
count: 1
@@ -7371,30 +7361,15 @@ parameters:
73717361
path: src/DatabaseInterface.php
73727362

73737363
-
7374-
message: "#^Cannot access offset 'Data_length' on mixed\\.$#"
7375-
count: 3
7376-
path: src/DatabaseInterface.php
7377-
7378-
-
7379-
message: "#^Cannot access offset 'Engine' on mixed\\.$#"
7380-
count: 1
7381-
path: src/DatabaseInterface.php
7382-
7383-
-
7384-
message: "#^Cannot access offset 'Index_length' on mixed\\.$#"
7364+
message: "#^Cannot access offset string\\|null on mixed\\.$#"
73857365
count: 3
73867366
path: src/DatabaseInterface.php
73877367

73887368
-
7389-
message: "#^Cannot access offset string on mixed\\.$#"
7369+
message: "#^Cannot cast mixed to string\\.$#"
73907370
count: 1
73917371
path: src/DatabaseInterface.php
73927372

7393-
-
7394-
message: "#^Cannot access offset string\\|null on mixed\\.$#"
7395-
count: 3
7396-
path: src/DatabaseInterface.php
7397-
73987373
-
73997374
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
74007375
count: 1
@@ -7491,7 +7466,7 @@ parameters:
74917466
path: src/DatabaseInterface.php
74927467

74937468
-
7494-
message: "#^Parameter \\#1 \\$string of function strtolower expects string, mixed given\\.$#"
7469+
message: "#^Parameter \\#1 \\$string of function strtolower expects string, int\\|string given\\.$#"
74957470
count: 1
74967471
path: src/DatabaseInterface.php
74977472

@@ -13655,26 +13630,6 @@ parameters:
1365513630
count: 1
1365613631
path: src/Profiling.php
1365713632

13658-
-
13659-
message: "#^Cannot access offset 'AUTO_INCREMENT' on mixed\\.$#"
13660-
count: 1
13661-
path: src/Query/Compatibility.php
13662-
13663-
-
13664-
message: "#^Cannot access offset 'AVG_ROW_LENGTH' on mixed\\.$#"
13665-
count: 1
13666-
path: src/Query/Compatibility.php
13667-
13668-
-
13669-
message: "#^Cannot access offset 'Auto_increment' on mixed\\.$#"
13670-
count: 1
13671-
path: src/Query/Compatibility.php
13672-
13673-
-
13674-
message: "#^Cannot access offset 'Avg_row_length' on mixed\\.$#"
13675-
count: 1
13676-
path: src/Query/Compatibility.php
13677-
1367813633
-
1367913634
message: "#^Cannot access offset 'CHARACTER_MAXIMUM…' on mixed\\.$#"
1368013635
count: 1
@@ -13690,16 +13645,6 @@ parameters:
1369013645
count: 1
1369113646
path: src/Query/Compatibility.php
1369213647

13693-
-
13694-
message: "#^Cannot access offset 'CHECKSUM' on mixed\\.$#"
13695-
count: 1
13696-
path: src/Query/Compatibility.php
13697-
13698-
-
13699-
message: "#^Cannot access offset 'CHECK_TIME' on mixed\\.$#"
13700-
count: 1
13701-
path: src/Query/Compatibility.php
13702-
1370313648
-
1370413649
message: "#^Cannot access offset 'COLLATION_NAME' on mixed\\.$#"
1370513650
count: 2
@@ -13730,53 +13675,13 @@ parameters:
1373013675
count: 2
1373113676
path: src/Query/Compatibility.php
1373213677

13733-
-
13734-
message: "#^Cannot access offset 'CREATE_OPTIONS' on mixed\\.$#"
13735-
count: 1
13736-
path: src/Query/Compatibility.php
13737-
13738-
-
13739-
message: "#^Cannot access offset 'CREATE_TIME' on mixed\\.$#"
13740-
count: 1
13741-
path: src/Query/Compatibility.php
13742-
13743-
-
13744-
message: "#^Cannot access offset 'Check_time' on mixed\\.$#"
13745-
count: 1
13746-
path: src/Query/Compatibility.php
13747-
13748-
-
13749-
message: "#^Cannot access offset 'Checksum' on mixed\\.$#"
13750-
count: 1
13751-
path: src/Query/Compatibility.php
13752-
1375313678
-
1375413679
message: "#^Cannot access offset 'Collation' on mixed\\.$#"
13755-
count: 2
13756-
path: src/Query/Compatibility.php
13757-
13758-
-
13759-
message: "#^Cannot access offset 'Comment' on mixed\\.$#"
13760-
count: 3
13761-
path: src/Query/Compatibility.php
13762-
13763-
-
13764-
message: "#^Cannot access offset 'Create_options' on mixed\\.$#"
13765-
count: 1
13766-
path: src/Query/Compatibility.php
13767-
13768-
-
13769-
message: "#^Cannot access offset 'Create_time' on mixed\\.$#"
1377013680
count: 1
1377113681
path: src/Query/Compatibility.php
1377213682

1377313683
-
13774-
message: "#^Cannot access offset 'DATA_FREE' on mixed\\.$#"
13775-
count: 1
13776-
path: src/Query/Compatibility.php
13777-
13778-
-
13779-
message: "#^Cannot access offset 'DATA_LENGTH' on mixed\\.$#"
13684+
message: "#^Cannot access offset 'Comment' on mixed\\.$#"
1378013685
count: 1
1378113686
path: src/Query/Compatibility.php
1378213687

@@ -13785,36 +13690,16 @@ parameters:
1378513690
count: 1
1378613691
path: src/Query/Compatibility.php
1378713692

13788-
-
13789-
message: "#^Cannot access offset 'Data_free' on mixed\\.$#"
13790-
count: 1
13791-
path: src/Query/Compatibility.php
13792-
13793-
-
13794-
message: "#^Cannot access offset 'Data_length' on mixed\\.$#"
13795-
count: 1
13796-
path: src/Query/Compatibility.php
13797-
1379813693
-
1379913694
message: "#^Cannot access offset 'Default' on mixed\\.$#"
1380013695
count: 1
1380113696
path: src/Query/Compatibility.php
1380213697

13803-
-
13804-
message: "#^Cannot access offset 'ENGINE' on mixed\\.$#"
13805-
count: 1
13806-
path: src/Query/Compatibility.php
13807-
1380813698
-
1380913699
message: "#^Cannot access offset 'EXTRA' on mixed\\.$#"
1381013700
count: 1
1381113701
path: src/Query/Compatibility.php
1381213702

13813-
-
13814-
message: "#^Cannot access offset 'Engine' on mixed\\.$#"
13815-
count: 5
13816-
path: src/Query/Compatibility.php
13817-
1381813703
-
1381913704
message: "#^Cannot access offset 'Extra' on mixed\\.$#"
1382013705
count: 1
@@ -13825,36 +13710,16 @@ parameters:
1382513710
count: 1
1382613711
path: src/Query/Compatibility.php
1382713712

13828-
-
13829-
message: "#^Cannot access offset 'INDEX_LENGTH' on mixed\\.$#"
13830-
count: 1
13831-
path: src/Query/Compatibility.php
13832-
1383313713
-
1383413714
message: "#^Cannot access offset 'IS_NULLABLE' on mixed\\.$#"
1383513715
count: 1
1383613716
path: src/Query/Compatibility.php
1383713717

13838-
-
13839-
message: "#^Cannot access offset 'Index_length' on mixed\\.$#"
13840-
count: 1
13841-
path: src/Query/Compatibility.php
13842-
1384313718
-
1384413719
message: "#^Cannot access offset 'Key' on mixed\\.$#"
1384513720
count: 1
1384613721
path: src/Query/Compatibility.php
1384713722

13848-
-
13849-
message: "#^Cannot access offset 'MAX_DATA_LENGTH' on mixed\\.$#"
13850-
count: 1
13851-
path: src/Query/Compatibility.php
13852-
13853-
-
13854-
message: "#^Cannot access offset 'Max_data_length' on mixed\\.$#"
13855-
count: 1
13856-
path: src/Query/Compatibility.php
13857-
1385813723
-
1385913724
message: "#^Cannot access offset 'NUMERIC_PRECISION' on mixed\\.$#"
1386013725
count: 1
@@ -13865,11 +13730,6 @@ parameters:
1386513730
count: 1
1386613731
path: src/Query/Compatibility.php
1386713732

13868-
-
13869-
message: "#^Cannot access offset 'Name' on mixed\\.$#"
13870-
count: 1
13871-
path: src/Query/Compatibility.php
13872-
1387313733
-
1387413734
message: "#^Cannot access offset 'Null' on mixed\\.$#"
1387513735
count: 1
@@ -13890,88 +13750,28 @@ parameters:
1389013750
count: 1
1389113751
path: src/Query/Compatibility.php
1389213752

13893-
-
13894-
message: "#^Cannot access offset 'ROW_FORMAT' on mixed\\.$#"
13895-
count: 1
13896-
path: src/Query/Compatibility.php
13897-
13898-
-
13899-
message: "#^Cannot access offset 'Row_format' on mixed\\.$#"
13900-
count: 1
13901-
path: src/Query/Compatibility.php
13902-
13903-
-
13904-
message: "#^Cannot access offset 'Rows' on mixed\\.$#"
13905-
count: 1
13906-
path: src/Query/Compatibility.php
13907-
1390813753
-
1390913754
message: "#^Cannot access offset 'TABLE_CATALOG' on mixed\\.$#"
1391013755
count: 1
1391113756
path: src/Query/Compatibility.php
1391213757

13913-
-
13914-
message: "#^Cannot access offset 'TABLE_COLLATION' on mixed\\.$#"
13915-
count: 1
13916-
path: src/Query/Compatibility.php
13917-
13918-
-
13919-
message: "#^Cannot access offset 'TABLE_COMMENT' on mixed\\.$#"
13920-
count: 1
13921-
path: src/Query/Compatibility.php
13922-
1392313758
-
1392413759
message: "#^Cannot access offset 'TABLE_NAME' on mixed\\.$#"
13925-
count: 2
13926-
path: src/Query/Compatibility.php
13927-
13928-
-
13929-
message: "#^Cannot access offset 'TABLE_ROWS' on mixed\\.$#"
1393013760
count: 1
1393113761
path: src/Query/Compatibility.php
1393213762

1393313763
-
1393413764
message: "#^Cannot access offset 'TABLE_SCHEMA' on mixed\\.$#"
13935-
count: 2
13936-
path: src/Query/Compatibility.php
13937-
13938-
-
13939-
message: "#^Cannot access offset 'TABLE_TYPE' on mixed\\.$#"
13940-
count: 3
13941-
path: src/Query/Compatibility.php
13942-
13943-
-
13944-
message: "#^Cannot access offset 'Type' on mixed\\.$#"
13945-
count: 4
13946-
path: src/Query/Compatibility.php
13947-
13948-
-
13949-
message: "#^Cannot access offset 'UPDATE_TIME' on mixed\\.$#"
1395013765
count: 1
1395113766
path: src/Query/Compatibility.php
1395213767

1395313768
-
13954-
message: "#^Cannot access offset 'Update_time' on mixed\\.$#"
13955-
count: 1
13956-
path: src/Query/Compatibility.php
13957-
13958-
-
13959-
message: "#^Cannot access offset 'VERSION' on mixed\\.$#"
13960-
count: 1
13961-
path: src/Query/Compatibility.php
13962-
13963-
-
13964-
message: "#^Cannot access offset 'Version' on mixed\\.$#"
13965-
count: 1
13966-
path: src/Query/Compatibility.php
13967-
13968-
-
13969-
message: "#^Method PhpMyAdmin\\\\Query\\\\Compatibility\\:\\:getISCompatForGetTablesFull\\(\\) should return array\\<array\\> but returns array\\.$#"
13769+
message: "#^Cannot access offset 'Type' on mixed\\.$#"
1397013770
count: 1
1397113771
path: src/Query/Compatibility.php
1397213772

1397313773
-
13974-
message: "#^Parameter \\#1 \\$string of function strtoupper expects string, mixed given\\.$#"
13774+
message: "#^Parameter \\#1 \\$string of function strtoupper expects string, \\(int\\|string\\) given\\.$#"
1397513775
count: 1
1397613776
path: src/Query/Compatibility.php
1397713777

0 commit comments

Comments
 (0)