Skip to content

[WCM] [Process] Doc for output flush methods. #2728

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

Merged
merged 3 commits into from
Oct 2, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions components/process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ output. Alternatively, the :method:`Symfony\\Component\\Process\\Process::getInc
and :method:`Symfony\\Component\\Process\\Process::getIncrementalErrorOutput`
methods returns the new outputs since the last call.

.. versionadded:: 2.4
The ``getAndFlushOutput()``, ``getAndFlushIncrementalOutput()``, ``getAndFlushErrorOutput()``, `
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the backtick at the end of this line should get removed

``getAndFlushIncrementalErrorOutput()``, ``flushOutput()`` and ``flushErrorOutput()`` methods were
added in Symfony 2.4.

These methods clears the output and error output buffers. Also, ``getAndFlushOutput()``,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think 'these' references to the method used in the versionadded directive. You can't do that, the versionadded directive will be removed when the version is deprecated and that means we get wrong sentences.

Also, please use the :method: rule (as shown on line 45). Don't use it in the versionadded.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok @wouterj, thank you for your feedback!

``getAndFlushIncrementalOutput()``, ``getAndFlushErrorOutput()`` and ``getAndFlushIncrementalErrorOutput()``
returns the outputs as well.

Getting real-time Process Output
--------------------------------

Expand Down