Merge branch 'QA_5_2'

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2023-08-06 14:08:54 -03:00
commit 57fd47a170
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
10 changed files with 448 additions and 455 deletions

View File

@ -65,6 +65,7 @@ phpMyAdmin - ChangeLog
- issue #18325 Allow hex representations for integers in the search box validation
- issue #14411 Fixed double tap to edit on mobile devices
- issue Update documentation to reflect that Node >= 12 is required to compile the JS and CSS files
- issue #18578 Fixed PDF export NULL values gives a type error
5.2.1 (2023-02-07)
- issue #17522 Fix case where the routes cache file is invalid

View File

@ -222,6 +222,16 @@ You can configure several phpMyAdmin features using environment variables:
.. note:: Used only if :envvar:`PMA_PORT` is empty.
.. envvar:: PMA_SOCKET
Socket file for the database connection.
.. envvar:: PMA_SOCKETS
Comma-separated list of socket files for the database connections.
.. note:: Used only if :envvar:`PMA_SOCKET` is empty.
.. envvar:: PMA_ABSOLUTE_URI
The fully-qualified path (``https://pma.example.net/``) where the reverse
@ -446,7 +456,7 @@ arbitrary server - allowing you to specify MySQL/MariaDB server on the login pag
.. code-block:: sh
docker-compose up -d
docker compose up -d
Customizing configuration file using docker-compose
---------------------------------------------------
@ -563,7 +573,7 @@ Quick Install
#. Choose an appropriate distribution kit from the phpmyadmin.net
Downloads page. Some kits contain only the English messages, others
contain all languages. We'll assume you chose a kit whose name
looks like ``phpMyAdmin-x.x.x -all-languages.tar.gz``.
looks like ``phpMyAdmin-x.x.x-all-languages.tar.gz``.
#. Ensure you have downloaded a genuine archive, see :ref:`verify`.
#. Untar or unzip the distribution (be sure to unzip the subdirectories):
``tar -xzvf phpMyAdmin_x.x.x-all-languages.tar.gz`` in your

View File

@ -179,7 +179,7 @@ class Pdf extends PdfLib
$l = $this->lMargin;
foreach ($this->colTitles as $col => $txt) {
$this->setXY($l, $this->tMargin);
$this->MultiCell($this->tablewidths[$col], $this->FontSizePt, $txt);
$this->MultiCell($this->tablewidths[$col], $this->FontSizePt, $txt ?? 'NULL');
$l += $this->tablewidths[$col];
$GLOBALS['maxY'] = $GLOBALS['maxY'] < $this->GetY() ? $this->GetY() : $GLOBALS['maxY'];
}
@ -191,7 +191,7 @@ class Pdf extends PdfLib
$this->setXY($l, $this->tMargin);
$this->Cell($this->tablewidths[$col], $GLOBALS['maxY'] - $this->tMargin, '', 1, 0, 'L', true);
$this->setXY($l, $this->tMargin);
$this->MultiCell($this->tablewidths[$col], $this->FontSizePt, $txt, 0, 'C');
$this->MultiCell($this->tablewidths[$col], $this->FontSizePt, $txt ?? 'NULL', 0, 'C');
$l += $this->tablewidths[$col];
}
@ -238,7 +238,7 @@ class Pdf extends PdfLib
$this->page = $currpage;
$this->setXY($l, $h);
if ($this->tablewidths[$col] > 0) {
$this->MultiCell($this->tablewidths[$col], $lineheight, $txt, 0, $this->colAlign[$col]);
$this->MultiCell($this->tablewidths[$col], $lineheight, $txt ?? 'NULL', 0, $this->colAlign[$col]);
$l += $this->tablewidths[$col];
}
@ -375,7 +375,7 @@ class Pdf extends PdfLib
$this->tablewidths[$col],
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->FontSizePt,
$txt,
$txt ?? 'NULL',
0,
$this->colAlign[$col],
);
@ -605,7 +605,7 @@ class Pdf extends PdfLib
$this->tablewidths[$col],
// phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
$this->FontSizePt,
$txt,
$txt ?? 'NULL',
0,
$this->colAlign[$col],
);
@ -754,7 +754,7 @@ class Pdf extends PdfLib
while ($row = $this->results->fetchRow()) {
foreach ($colFits as $key => $val) {
/** @var float $stringWidth */
$stringWidth = $this->GetStringWidth($row[$key]);
$stringWidth = $this->GetStringWidth($row[$key] ?? 'NULL');
$stringWidth += 6;
if ($adjustingMode && ($stringWidth > $sColWidth)) {
// any column whose data's width is bigger than

View File

@ -20270,11 +20270,6 @@ parameters:
count: 3
path: libraries/classes/Plugins/Export/Helpers/Pdf.php
-
message: "#^Parameter \\#3 \\$txt of method TCPDF\\:\\:MultiCell\\(\\) expects string, string\\|null given\\.$#"
count: 1
path: libraries/classes/Plugins/Export/Helpers/Pdf.php
-
message: "#^Parameter \\#3 \\$x2 of method TCPDF\\:\\:Line\\(\\) expects float, \\(array\\|float\\|int\\) given\\.$#"
count: 3
@ -20310,6 +20305,11 @@ parameters:
count: 6
path: libraries/classes/Plugins/Export/Helpers/Pdf.php
-
message: "#^Variable \\$txt on left side of \\?\\? always exists and is not nullable\\.$#"
count: 1
path: libraries/classes/Plugins/Export/Helpers/Pdf.php
-
message: "#^Cannot cast mixed to string\\.$#"
count: 6

View File

@ -6,7 +6,6 @@
cacheDirectory="build/.phpunit.cache"
executionOrder="random"
defaultTestSuite="unit"
failOnIncomplete="true"
failOnRisky="true"
failOnWarning="true"
displayDetailsOnTestsThatTriggerWarnings="true"

View File

@ -8875,10 +8875,10 @@
<code><![CDATA[$this->tablewidths[$col]]]></code>
<code><![CDATA[$this->tablewidths[$col]]]></code>
<code><![CDATA[$this->titleFontSize ?: $this->FontSizePt]]></code>
<code>$txt</code>
<code>$txt</code>
<code>$txt</code>
<code>$txt</code>
<code><![CDATA[$txt ?? 'NULL']]></code>
<code><![CDATA[$txt ?? 'NULL']]></code>
<code><![CDATA[$txt ?? 'NULL']]></code>
<code><![CDATA[$txt ?? 'NULL']]></code>
<code>$y</code>
</MixedArgument>
<MixedArrayAccess>
@ -9050,10 +9050,6 @@
<ParamNameMismatch>
<code>$topMargin</code>
</ParamNameMismatch>
<PossiblyNullArgument>
<code>$row[$key]</code>
<code>$txt</code>
</PossiblyNullArgument>
<PossiblyNullOperand>
<code><![CDATA[$GLOBALS['maxY']]]></code>
</PossiblyNullOperand>

View File

@ -1,5 +1,4 @@
<select>
<option value="">&nbsp;</option>
{% for value in values %}
<option value="{{ value|raw }}"{{ value in selected_values ? " selected" }}>{{ value|raw }}</option>
{% endfor %}

View File

@ -104,7 +104,6 @@ class EnumValuesControllerTest extends AbstractTestCase
$this->assertSame(
[
'dropdown' => '<select>' . "\n"
. ' <option value="">&nbsp;</option>' . "\n"
. ' <option value="&lt;script&gt;alert(&quot;ok&quot;)&lt;/script&gt;">'
. '&lt;script&gt;alert(&quot;ok&quot;)&lt;/script&gt;</option>' . "\n"
. ' <option value="a&amp;b">a&amp;b</option>' . "\n"

View File

@ -115,7 +115,7 @@ class DbiDummy implements DbiExtension
return true;
}
Assert::markTestIncomplete('Non expected select of database: ' . $databaseName);
Assert::fail('Non expected select of database: ' . $databaseName);
}
public function assertAllQueriesConsumed(): void
@ -176,7 +176,7 @@ class DbiDummy implements DbiExtension
$query = trim((string) preg_replace('/ */', ' ', str_replace("\n", ' ', $query)));
$found = $this->findFifoQuery($query) ?? $this->findDummyQuery($query);
if (! $found) {
Assert::markTestIncomplete('Not supported query: ' . $query);
Assert::fail('Not supported query: ' . $query);
}
if ($found['result'] === false) {

847
yarn.lock

File diff suppressed because it is too large Load Diff