8000 [11.x] Fixes escaping path via Process given as array (#51926) · laravel/framework@28b5d4e · GitHub
[go: up one dir, main page]

Skip to content

Commit 28b5d4e

Browse files
authored
[11.x] Fixes escaping path via Process given as array (#51926)
Introduced in symfony/symfony#52409 we no longer should use `Illuminate\Support\ProcessUtils::escapeArgument()` unless calling `Process` via `Process::fromShellCommandline()` fixes #51820 Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
1 parent 8258a7c commit 28b5d4e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Illuminate/Support/Composer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ protected function findComposerFile()
204204
*/
205205
protected function phpBinary()
206206
{
207-
return ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false));
207+
return (string) (new PhpExecutableFinder)->find(false);
208208
}
209209

210210
/**

tests/Support/SupportComposerTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ public function testDumpAutoloadRunsTheCorrectCommand()
2424

2525
public function testDumpAutoloadRunsTheCorrectCommandWhenCustomComposerPharIsPresent()
2626
{
27-
$escape = '\\' === DIRECTORY_SEPARATOR ? '"' : '\'';
28-
29-
$expectedProcessArguments = [$escape.PHP_BINARY.$escape, 'composer.phar', 'dump-autoload'];
27+
$expectedProcessArguments = [PHP_BINARY, 'composer.phar', 'dump-autoload'];
3028
$customComposerPhar = true;
3129

3230
$composer = $this->mockComposer($expectedProcessArguments, $customComposerPhar);

0 commit comments

Comments
 (0)
0