Skip to content

Commit 0776b99

Browse files
Merge branch '5.4' into 6.4
* 5.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`
2 parents 836d34f + d94dda5 commit 0776b99

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Process.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1582,7 +1582,7 @@ private function escapeArgument(?string $argument): string
15821582
if (str_contains($argument, "\0")) {
15831583
$argument = str_replace("\0", '?', $argument);
15841584
}
1585-
if (!preg_match('/[\/()%!^"<>&|\s]/', $argument)) {
1585+
if (!preg_match('/[()%!^"<>&|\s]/', $argument)) {
15861586
return $argument;
15871587
}
15881588
$argument = preg_replace('/(\\\\+)$/', '$1$1', $argument);

Tests/ProcessTest.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,12 @@ public function testGetCommandLine()
14361436
{
14371437
$p = new Process(['/usr/bin/php']);
14381438

1439-
$expected = '\\' === \DIRECTORY_SEPARATOR ? '"/usr/bin/php"' : "'/usr/bin/php'";
1439+
$expected = '\\' === \DIRECTORY_SEPARATOR ? '/usr/bin/php' : "'/usr/bin/php'";
1440+
$this->assertSame($expected, $p->getCommandLine());
1441+
1442+
$p = new Process(['cd', '/d']);
1443+
1444+
$expected = '\\' === \DIRECTORY_SEPARATOR ? 'cd /d' : "'cd' '/d'";
14401445
$this->assertSame($expected, $p->getCommandLine());
14411446
}
14421447

0 commit comments

Comments
 (0)