File tree 1 file changed +13
-5
lines changed
1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -351,17 +351,25 @@ instead::
351
351
$process->run();
352
352
353
353
Using a Prepared Command Line
354
- --------------------------------
354
+ -----------------------------
355
355
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::
359
360
360
361
use Symfony\Component\Process\Process;
361
362
362
363
$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
364
371
372
+ Prepared command lines were introduced in Symfony 4.4.
365
373
366
374
Process Timeout
367
375
---------------
You can’t perform that action at this time.
0 commit comments