Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 35a2458

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

File tree

1 file changed

+1
-4
lines changed
Filter options

1 file changed

+1
-4
lines changed

‎src/Symfony/Component/Process/Process.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Process/Process.php
+1-4Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.