Skip to content

Commit fabf58d

Browse files
committed
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2 parents 48c6e9f + 90f3c58 commit fabf58d

File tree

21 files changed

+358
-71
lines changed

21 files changed

+358
-71
lines changed

ChangeLog

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,33 @@ phpMyAdmin - ChangeLog
120120
- issue #18210 Fixed add replica replication user on MariaDB doesn't work (SQL syntax)
121121
- issue #19041 Fix footer.twig gets printed to Binary File Download
122122
- issue #19091 Fix to stop processing queries on error
123+
- issue #18241 Fix copy SQL query button on error messages
124+
- issue #17190 Fix an error with SELECT ... FOR UPDATE queries
125+
- issue #19145 Remove duplicate server and lang parameters from links
126+
- issue #19158 Fix an issue with backticks on the query generator
127+
- issue #19174 Fix an issue with column alias with asterisk on the query generator
128+
- issue #19146 Fix column sorting with limit subquery
129+
- issue #19152 Fix the number of lines being ignored in GIS visualization after a search
130+
- issue #19189 Fix issue with column sorting when using 'group by'
131+
- issue #19188 Fix issue with simulated queries reporting syntax errors
132+
- issue #19141 Add cookie prefix '-__Secure-' to cookies to help prevent cookie smuggling
133+
- issue #19218 Fix textarea horizontal resizing with Bootstap theme
134+
- issue #19199 Add support for fractional seconds to current_timestamp()
135+
- issue #19221 Fix query statistics for queries with count(*)
136+
- issue #19203 Fix single quotes and backslashes for the query generator
137+
- issue #19163 Fix queries with IS NULL or IS NOT NULL for the query generator
138+
- issue #19181 Fix query generator support for IN() and NOT IN()
139+
- issue #19167 Fix criteria on column '*' for the query generator
140+
- issue #19213 Fix possible issue when exporting a large data set
141+
- issue #19217 Fix issue when editing a cell of a JSON column
142+
- issue #19244 Add yarn 1.22 to the package.json's packageManager field
143+
- issue #19185 Fix visual issue when a row has only empty cells
144+
- issue #19257 Fix issue when adding an index with an invalid name
145+
- issue #19276 Fix compatibility with Twig 3.12
146+
- issue #19283 Fix issue when the server starts with skip-innodb option
147+
- issue #19299 Fix charset in procedure's parameter type
148+
- issue #19316 Fix input size for hexadecimal values
149+
- issue #19321 Suppress deprecation message of E_STRICT constant
123150

124151
5.2.1 (2023-02-07)
125152
- issue #17522 Fix case where the routes cache file is invalid

phpstan-baseline.neon

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11919,7 +11919,7 @@ parameters:
1191911919

1192011920
-
1192111921
message: "#^Parameter \\#1 \\$str of method PhpMyAdmin\\\\DatabaseInterface\\:\\:quoteString\\(\\) expects string, mixed given\\.$#"
11922-
count: 1
11922+
count: 2
1192311923
path: src/Replication/Replication.php
1192411924

1192511925
-
@@ -11938,6 +11938,16 @@ parameters:
1193811938
count: 8
1193911939
path: src/Replication/ReplicationGui.php
1194011940

11941+
-
11942+
message: "#^Cannot access offset 'Replica_IO_Running' on mixed\\.$#"
11943+
count: 1
11944+
path: src/Replication/ReplicationGui.php
11945+
11946+
-
11947+
message: "#^Cannot access offset 'Replica_SQL_Running' on mixed\\.$#"
11948+
count: 2
11949+
path: src/Replication/ReplicationGui.php
11950+
1194111951
-
1194211952
message: "#^Cannot access offset 'Slave_IO_Running' on mixed\\.$#"
1194311953
count: 1

psalm-baseline.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9581,6 +9581,7 @@
95819581
<file src="src/Replication/Replication.php">
95829582
<MixedArgument>
95839583
<code><![CDATA[$pos['File']]]></code>
9584+
<code><![CDATA[$pos['File']]]></code>
95849585
</MixedArgument>
95859586
<MixedArrayAccess>
95869587
<code><![CDATA[$data[0]['File']]]></code>
@@ -9592,6 +9593,7 @@
95929593
</MixedAssignment>
95939594
<MixedOperand>
95949595
<code><![CDATA[$pos['Position']]]></code>
9596+
<code><![CDATA[$pos['Position']]]></code>
95959597
</MixedOperand>
95969598
<MixedReturnTypeCoercion>
95979599
<code><![CDATA[$output]]></code>
@@ -9630,8 +9632,6 @@
96309632
<code><![CDATA[$urlParams]]></code>
96319633
</MixedArgumentTypeCoercion>
96329634
<MixedArrayAccess>
9633-
<code><![CDATA[$serverReplicaReplication[0]['Slave_IO_Running']]]></code>
9634-
<code><![CDATA[$serverReplicaReplication[0]['Slave_SQL_Running']]]></code>
96359635
<code><![CDATA[$serverReplication[0][$variable]]]></code>
96369636
</MixedArrayAccess>
96379637
<MixedArrayAssignment>
@@ -13098,6 +13098,7 @@
1309813098
<code><![CDATA[$_SESSION]]></code>
1309913099
</InvalidScalarArgument>
1310013100
<PossiblyUnusedMethod>
13101+
<code><![CDATA[addErrorProvider]]></code>
1310113102
<code><![CDATA[providerForTestHandleError]]></code>
1310213103
</PossiblyUnusedMethod>
1310313104
<PropertyTypeCoercion>
@@ -13123,6 +13124,8 @@
1312313124
</file>
1312413125
<file src="tests/unit/Error/ErrorTest.php">
1312513126
<PossiblyUnusedMethod>
13127+
<code><![CDATA[errorLevelProvider]]></code>
13128+
<code><![CDATA[errorTypeProvider]]></code>
1312613129
<code><![CDATA[invalidFilePathsProvider]]></code>
1312713130
<code><![CDATA[validFilePathsProvider]]></code>
1312813131
</PossiblyUnusedMethod>
@@ -14066,6 +14069,7 @@
1406614069
<PossiblyUnusedMethod>
1406714070
<code><![CDATA[providerForTestHasAccountLocking]]></code>
1406814071
<code><![CDATA[providerForTestIsUUIDSupported]]></code>
14072+
<code><![CDATA[showBinLogStatusProvider]]></code>
1406914073
</PossiblyUnusedMethod>
1407014074
</file>
1407114075
<file src="tests/unit/Replication/ReplicationGuiTest.php">

resources/js/src/sql.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ AJAX.registerTeardown('sql.js', function () {
422422
$(document).off('click', 'a.delete_row.ajax');
423423
$(document).off('submit', '.bookmarkQueryForm');
424424
$('input#bkm_label').off('input');
425-
$(document).off('makegrid', '.sqlqueryresults');
425+
$(document).off('makeGrid', '.sqlqueryresults');
426426
$('#togglequerybox').off('click');
427427
$(document).off('click', '#button_submit_query');
428428
$(document).off('change', '#id_bookmark');
@@ -649,11 +649,11 @@ AJAX.registerOnload('sql.js', function () {
649649
}); // end of Copy to Clipboard action
650650

651651
/**
652-
* Attach the {@link makegrid} function to a custom event, which will be
652+
* Attach the {@link makeGrid} function to a custom event, which will be
653653
* triggered manually everytime the table of results is reloaded
654654
* @memberOf jQuery
655655
*/
656-
$(document).on('makegrid', '.sqlqueryresults', function () {
656+
$(document).on('makeGrid', '.sqlqueryresults', function () {
657657
$('.table_results').each(function () {
658658
window.makeGrid(this);
659659
});
@@ -887,7 +887,7 @@ AJAX.registerOnload('sql.js', function () {
887887
};
888888
}
889889

890-
$('.sqlqueryresults').trigger('makegrid');
890+
$('.sqlqueryresults').trigger('makeGrid');
891891
$('#togglequerybox').show();
892892

893893
if (typeof data.action_bookmark === 'undefined') {
@@ -927,7 +927,7 @@ AJAX.registerOnload('sql.js', function () {
927927
var $sqlqueryresults = $form.parents('.sqlqueryresults');
928928
$sqlqueryresults
929929
.html(data.message)
930-
.trigger('makegrid');
930+
.trigger('makeGrid');
931931

932932
highlightSql($sqlqueryresults);
933933
}); // end $.post()
@@ -1307,7 +1307,7 @@ AJAX.registerOnload('sql.js', function () {
13071307
/**
13081308
* create resizable table
13091309
*/
1310-
$('.sqlqueryresults').trigger('makegrid');
1310+
$('.sqlqueryresults').trigger('makeGrid');
13111311

13121312
/**
13131313
* Check if there is any saved query

resources/js/src/table/select.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ AJAX.registerOnload('table/select.js', function () {
166166
$('#sqlqueryresultsouter').html(data.sql_query);
167167
} else { // results found
168168
$('#sqlqueryresultsouter').html(data.message);
169-
$('.sqlqueryresults').trigger('makegrid');
169+
$('.sqlqueryresults').trigger('makeGrid');
170170
}
171171

172172
$('#tbl_search_form')

src/Controllers/Server/BinlogController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final class BinlogController implements InvocableController
3131

3232
public function __construct(private readonly ResponseRenderer $response, private readonly DatabaseInterface $dbi)
3333
{
34-
$this->binaryLogs = $this->dbi->fetchResult('SHOW MASTER LOGS', 'Log_name');
34+
$this->binaryLogs = $this->dbi->fetchResult('SHOW BINARY LOGS', 'Log_name');
3535
}
3636

3737
public function __invoke(ServerRequest $request): Response

src/DatabaseInterface.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1990,6 +1990,12 @@ public function getVersionComment(): string
19901990
return $this->versionComment;
19911991
}
19921992

1993+
/** Whether connection is MySQL */
1994+
public function isMySql(): bool
1995+
{
1996+
return ! $this->isMariaDb;
1997+
}
1998+
19931999
/**
19942000
* Whether connection is MariaDB
19952001
*/

src/Dbal/DbalInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,9 @@ public function getVersionString(): string;
578578
*/
579579
public function getVersionComment(): string;
580580

581+
/** Whether connection is MySQL */
582+
public function isMySql(): bool;
583+
581584
/**
582585
* Whether connection is MariaDB
583586
*/

src/Error/Error.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
use const E_NOTICE;
4141
use const E_PARSE;
4242
use const E_RECOVERABLE_ERROR;
43-
use const E_STRICT;
4443
use const E_USER_DEPRECATED;
4544
use const E_USER_ERROR;
4645
use const E_USER_NOTICE;
@@ -271,7 +270,7 @@ public function getType(): string
271270
E_USER_ERROR => 'User Error',
272271
E_USER_WARNING => 'User Warning',
273272
E_USER_NOTICE => 'User Notice',
274-
E_STRICT => 'Runtime Notice',
273+
2048 => 'Runtime Notice', // E_STRICT
275274
E_DEPRECATED => 'Deprecation Notice',
276275
E_USER_DEPRECATED => 'Deprecation Notice',
277276
E_RECOVERABLE_ERROR => 'Catchable Fatal Error',
@@ -284,7 +283,7 @@ protected function getLevel(): MessageType
284283
default => MessageType::Error,
285284
E_NOTICE,
286285
E_USER_NOTICE,
287-
E_STRICT,
286+
2048, // E_STRICT
288287
E_DEPRECATED,
289288
E_USER_DEPRECATED => MessageType::Notice,
290289
};

src/Error/ErrorHandler.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
use const E_NOTICE;
3434
use const E_PARSE;
3535
use const E_RECOVERABLE_ERROR;
36-
use const E_STRICT;
3736
use const E_USER_DEPRECATED;
3837
use const E_USER_ERROR;
3938
use const E_USER_NOTICE;
@@ -283,7 +282,7 @@ public function addError(
283282
}
284283

285284
switch ($error->getErrorNumber()) {
286-
case E_STRICT:
285+
case 2048: // E_STRICT
287286
case E_DEPRECATED:
288287
case E_NOTICE:
289288
case E_WARNING:

0 commit comments

Comments
 (0)