Skip to content

Commit 8d0d9fa

Browse files
committed
Merge branch '4.4' into 5.4
* 4.4: Improve DE translations for Form/Validator [WebProfilerBundle] Fix dark theme selected line highlight color & reuse css vars [Mime] Check that the path is a file in the DataPart::fromPath [Cache] do not pass null to strlen()
2 parents deb04f2 + 924670d commit 8d0d9fa

File tree

6 files changed

+18
-9
lines changed

6 files changed

+18
-9
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
--highlight-default: #222222;
5252
--highlight-keyword: #a71d5d;
5353
--highlight-string: #183691;
54+
--highlight-selected-line: rgba(255, 255, 153, 0.5);
5455
--base-0: #fff;
5556
--base-1: #f5f5f5;
5657
--base-2: #e0e0e0;
@@ -104,6 +105,7 @@
104105
--highlight-default: var(--base-6);
105106
--highlight-keyword: #ff413c;
106107
--highlight-string: #70a6fd;
108+
--highlight-selected-line: rgba(14, 14, 14, 0.5);
107109
--base-0: #2e3136;
108110
--base-1: #444;
109111
--base-2: #666;
@@ -1296,15 +1298,15 @@ tr.log-status-silenced {
12961298
padding: 0;
12971299
}
12981300
#collector-content .sf-validator .trace li.selected {
1299-
background: rgba(255, 255, 153, 0.5);
1301+
background: var(--highlight-selected-line);
13001302
}
13011303

13021304
{# Messenger panel
13031305
========================================================================= #}
13041306

13051307
#collector-content .message-bus .trace {
1306-
border: 1px solid #DDD;
1307-
background: #FFF;
1308+
border: var(--border);
1309+
background: var(--base-0);
13081310
padding: 10px;
13091311
margin: 0.5em 0;
13101312
overflow: auto;
@@ -1317,7 +1319,7 @@ tr.log-status-silenced {
13171319
padding: 0;
13181320
}
13191321
#collector-content .message-bus .trace li.selected {
1320-
background: rgba(255, 255, 153, 0.5);
1322+
background: var(--highlight-selected-line);
13211323
}
13221324

13231325
{# Dump panel

src/Symfony/Component/Cache/Traits/RedisTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ protected function doClear(string $namespace)
387387
{
388388
if ($this->redis instanceof \Predis\ClientInterface) {
389389
$prefix = $this->redis->getOptions()->prefix ? $this->redis->getOptions()->prefix->getPrefix() : '';
390-
$prefixLen = \strlen($prefix);
390+
$prefixLen = \strlen($prefix ?? '');
391391
}
392392

393393
$cleared = true;

src/Symfony/Component/Form/Resources/translations/validators.de.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</trans-unit>
1313
<trans-unit id="30">
1414
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15-
<target>Der CSRF-Token ist ungültig. Versuchen Sie bitte das Formular erneut zu senden.</target>
15+
<target>Der CSRF-Token ist ungültig. Versuchen Sie bitte, das Formular erneut zu senden.</target>
1616
</trans-unit>
1717
<trans-unit id="99">
1818
<source>This value is not a valid HTML5 color.</source>

src/Symfony/Component/Mime/Part/DataPart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static function fromPath(string $path, string $name = null, string $conte
6161
$contentType = self::$mimeTypes->getMimeTypes($ext)[0] ?? 'application/octet-stream';
6262
}
6363

64-
if (false === is_readable($path)) {
64+
if (!is_file($path) || !is_readable($path)) {
6565
throw new InvalidArgumentException(sprintf('Path "%s" is not readable.', $path));
6666
}
6767

src/Symfony/Component/Mime/Tests/Part/DataPartTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Mime\Tests\Part;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Component\Mime\Exception\InvalidArgumentException;
1516
use Symfony\Component\Mime\Header\Headers;
1617
use Symfony\Component\Mime\Header\IdentificationHeader;
1718
use Symfony\Component\Mime\Header\ParameterizedHeader;
@@ -127,6 +128,12 @@ public function testFromPathWithMeta()
127128
), $p->getPreparedHeaders());
128129
}
129130

131+
public function testFromPathWithNotAFile()
132+
{
133+
$this->expectException(InvalidArgumentException::class);
134+
DataPart::fromPath(__DIR__.'/../Fixtures/mimetypes/');
135+
}
136+
130137
public function testHasContentId()
131138
{
132139
$p = new DataPart('content');

src/Symfony/Component/Validator/Resources/translations/validators.de.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
</trans-unit>
221221
<trans-unit id="58">
222222
<source>Unsupported card type or invalid card number.</source>
223-
<target>Nicht unterstützer Kartentyp oder ungültige Kartennummer.</target>
223+
<target>Nicht unterstützter Kartentyp oder ungültige Kartennummer.</target>
224224
</trans-unit>
225225
<trans-unit id="59">
226226
<source>This is not a valid International Bank Account Number (IBAN).</source>
@@ -312,7 +312,7 @@
312312
</trans-unit>
313313
<trans-unit id="81">
314314
<source>This is not a valid Business Identifier Code (BIC).</source>
315-
<target>Dieser Wert ist kein gültiger BIC.</target>
315+
<target>Dieser Wert ist keine gültige internationale Bankleitzahl (BIC).</target>
316316
</trans-unit>
317317
<trans-unit id="82">
318318
<source>Error</source>

0 commit comments

Comments
 (0)