From c5c006ffff68c276026d7fd82c6396699ddb43ae Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 12 Sep 2020 15:11:15 +0200 Subject: [PATCH] [Process] Document the method to configure options --- components/process.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/components/process.rst b/components/process.rst index c7b286fec71..c70c602ac98 100644 --- a/components/process.rst +++ b/components/process.rst @@ -102,6 +102,21 @@ with a non-zero code):: :method:`Symfony\\Component\\Process\\Process::getLastOutputTime` method. This method returns ``null`` if the process wasn't started! +Configuring Process Options +--------------------------- + +.. versionadded:: 5.2 + + The feature to configure process options was introduced in Symfony 5.2. + +Symfony uses the PHP :phpfunction:`proc_open` function to run the processes. +You can configure the options passed to the ``other_options`` argument of +``proc_open()`` using the ``setOptions()`` method:: + + $process = new Process(['...', '...', '...']); + // this option allows a subprocess to continue running after the main script exited + $process->setOptions(['create_new_console' => true]); + Using Features From the OS Shell --------------------------------