Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feature #25142 [Process] Create a "isTtySupported" static method (nesk)
This PR was merged into the 4.1-dev branch. Discussion ---------- [Process] Create a "isTtySupported" static method | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | _none_ | License | MIT | Doc PR | _none_ Currently, there is no way to enable the TTY mode without risking an exception. This PR extracts the code checking for TTY support and provides it in a `isTtySupported` static method. Now we can enable the TTY mode everywhere it's available without risking an exception: ```php $process = (new Process)->setTty(Process::isTtySupported()); ``` _Old comment_: > I'm targeting the 2.7 branch since this is not really a new feature, just a little refactoring of the existent code, and it is fully backward compatible. Commits ------- a1398f6 Create a "isTtySupported" static method
- Loading branch information