8000 [Process] Update PHPDoc to use proper placeholder syntax · symfony/symfony@35a2458 · GitHub
[go: up one dir, main page]

Skip to content

Commit 35a2458

Browse files
author
Chris McGehee
committed
[Process] Update PHPDoc to use proper placeholder syntax
1 parent 916ff7a commit 35a2458

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Symfony/Component/Process/Process.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,9 @@ public function __construct($command, string $cwd = null, array $env = null, $in
177177
* In order to inject dynamic values into command-lines, we strongly recommend using placeholders.
178178
* This will save escaping values, which is not portable nor secure anyway:
179179
*
180-
* $process = Process::fromShellCommandline('my_command "$MY_VAR"');
180+
* $process = Process::fromShellCommandline('my_command "${:MY_VAR}"');
181181
* $process->run(null, ['MY_VAR' => $theValue]);
182182
*
183-
* It is also recommended to use double quotes around placeholders. This will help ensure the value
184-
* of the placeholder is passed as a single argument which can help avoid security issues.
185-
*
186183
* @param string $command The command line to pass to the shell of the OS
187184
* @param string|null $cwd The working directory or null to use the working dir of the current PHP process
188185
* @param array|null $env The environment variables or null to use the same environment as the current PHP process

0 commit comments

Comments
 (0)
0