-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Process] allow writing "prepared" command line. #11802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -350,6 +350,19 @@ instead:: | |
); | ||
$process->run(); | ||
|
||
Using a Prepared Command Line | ||
-------------------------------- | ||
|
||
This component also provides a way to use the process command with prepared using the double brackets notations: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing word after There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. double bracket notation There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does "double bracket notation" mean? |
||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use a placeholder? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PHP |
||
The component will not escape the characters, you are responsible of doing so:: | ||
|
||
use Symfony\Component\Process\Process; | ||
|
||
$process = Process::fromShellCommandline('echo "$name"'); | ||
$process->run(null, ['name' => 'elsa']); | ||
|
||
|
||
Process Timeout | ||
--------------- | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the same length as the title itself to be valid