Skip to content

Commit aee645a

Browse files
Merge branch '6.4' into 7.1
* 6.4: [Validator] Fix 58691 (missing plural-options in serbian language translation) profiler form data collector extart value property if it is setted [Process] Fix escaping /X arguments on Windows [Config] Handle Phar absolute path in `FileLocator` [Runtime] Remove unused `SKIPIF` from `dotenv_overload.phpt`
2 parents 9254240 + cb22aff commit aee645a

File tree

8 files changed

+125
-118
lines changed

8 files changed

+125
-118
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,8 +646,10 @@
646646
<td>{{ profiler_dump(value) }}</td>
647647
<td>
648648
{# values can be stubs #}
649-
{% set option_value = value.value|default(value) %}
650-
{% set resolved_option_value = data.resolved_options[option].value|default(data.resolved_options[option]) %}
649+
{% set option_value = (value.value is defined) ? value.value : value %}
650+
{% set resolved_option_value = (data.resolved_options[option].value is defined)
651+
? data.resolved_options[option].value
652+
: data.resolved_options[option] %}
651653
{% if resolved_option_value == option_value %}
652654
<em class="font-normal text-muted">same as passed value</em>
653655
{% else %}

src/Symfony/Component/Config/FileLocator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ private function isAbsolutePath(string $file): bool
8787
&& ('\\' === $file[2] || '/' === $file[2])
8888
)
8989
|| parse_url($file, \PHP_URL_SCHEME)
90+
|| str_starts_with($file, 'phar:///') // "parse_url()" doesn't handle absolute phar path, despite being valid
9091
) {
9192
return true;
9293
}

src/Symfony/Component/Config/Tests/FileLocatorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public static function getIsAbsolutePathTests(): array
3838
['\\server\\foo.xml'],
3939
['https://server/foo.xml'],
4040
['phar://server/foo.xml'],
41+
['phar:///server/foo.xml'],
4142
];
4243
}
4344

src/Symfony/Component/Process/Process.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ private function escapeArgument(?string $argument): string
16311631
if (str_contains($argument, "\0")) {
16321632
$argument = str_replace("\0", '?', $argument);
16331633
}
1634-
if (!preg_match('/[\/()%!^"<>&|\s]/', $argument)) {
1634+
if (!preg_match('/[()%!^"<>&|\s]/', $argument)) {
16351635
return $argument;
16361636
}
16371637
$argument = preg_replace('/(\\\\+)$/', '$1$1', $argument);

src/Symfony/Component/Process/Tests/ProcessTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,12 @@ public function testGetCommandLine()
14701470
{
14711471
$p = new Process(['/usr/bin/php']);
14721472

1473-
$expected = '\\' === \DIRECTORY_SEPARATOR ? '"/usr/bin/php"' : "'/usr/bin/php'";
1473+
$expected = '\\' === \DIRECTORY_SEPARATOR ? '/usr/bin/php' : "'/usr/bin/php'";
1474+
$this->assertSame($expected, $p->getCommandLine());
1475+
1476+
$p = new Process(['cd', '/d']);
1477+
1478+
$expected = '\\' === \DIRECTORY_SEPARATOR ? 'cd /d' : "'cd' '/d'";
14741479
$this->assertSame($expected, $p->getCommandLine());
14751480
}
14761481

src/Symfony/Component/Runtime/Tests/phpt/dotenv_overload.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Test Dotenv overload
3-
--SKIPIF--
4-
<?php require dirname(__DIR__, 6).'/vendor/autoload.php'; if (4 > (new \ReflectionMethod(\Symfony\Component\Dotenv\Dotenv::class, 'bootEnv'))->getNumberOfParameters()) die('Skip because Dotenv version is too low');
53
--INI--
64
display_errors=1
75
--FILE--

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

Lines changed: 37 additions & 37 deletions
Large diffs are not rendered by default.

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

Lines changed: 75 additions & 75 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)