We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b18e3c3 + 531e1d0 commit fe6c301Copy full SHA for fe6c301
components/process.rst
@@ -350,6 +350,27 @@ instead::
350
);
351
$process->run();
352
353
+Using a Prepared Command Line
354
+-----------------------------
355
+
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::
360
361
+ use Symfony\Component\Process\Process;
362
363
+ $process = Process::fromShellCommandline('echo "$name"');
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
371
372
+ Prepared command lines were introduced in Symfony 4.4.
373
374
Process Timeout
375
---------------
376
0 commit comments