Skip to content

Commit a123c08

Browse files
authored
[Process] allow writing "prepared" command line.
1 parent 17170ed commit a123c08

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

components/process.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,18 @@ instead::
350350
);
351351
$process->run();
352352

353+
Using the prepared command lines
354+
--------------------------------
355+
356+
This component also provides a way to use the process command with prepared using the double brackets notations:
357+
358+
use Symfony\Component\Process\Process;
359+
360+
$process = Process::fromShellCommandline('echo "$name"');
361+
$process->run(null, array('name' => 'elsa'));
362+
363+
Which means that you can use placeholder in order to have a process that can be changed only with the values and without changing the php code. The component will not escape the characters, you are responsible of doing so.
364+
353365
Process Timeout
354366
---------------
355367

0 commit comments

Comments
 (0)