Skip to content

Commit 531e1d0

Browse files
committed
Tweaks #11802
1 parent a316cd5 commit 531e1d0

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

components/process.rst

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -351,17 +351,25 @@ instead::
351351
$process->run();
352352

353353
Using a Prepared Command Line
354-
--------------------------------
354+
-----------------------------
355355

356-
This component also provides a way to use the process command with prepared using the double brackets notations:
357-
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.
358-
The component will not escape the characters, you are responsible of doing so::
356+
You can run the process by using a a prepared command line using the
357+
double bracket notation. You can use a placeholder in order to have a
358+
process that can only be changed with the values and without changing
359+
the PHP code::
359360

360361
use Symfony\Component\Process\Process;
361362

362363
$process = Process::fromShellCommandline('echo "$name"');
363-
$process->run(null, ['name' => 'elsa']);
364+
$process->run(null, ['name' => 'Elsa']);
365+
366+
.. caution::
367+
368+
A prepared command line will not be escaped automatically!
369+
370+
.. versionadded:: 4.4
364371

372+
Prepared command lines were introduced in Symfony 4.4.
365373

366374
Process Timeout
367375
---------------

0 commit comments

Comments
 (0)