Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: symfony/console
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.4.26
Choose a base ref
...
head repository: symfony/console
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.4.27
Choose a head ref
  • 3 commits
  • 7 files changed
  • 3 contributors

Commits on Oct 2, 2025

  1. Configuration menu
    Copy the full SHA
    250376a View commit details
    Browse the repository at this point in the history
  2. bug #61861 [Console] Ensure terminal is usable after termination sign…

    …al (johnstevenson)
    
    This PR was squashed before being merged into the 6.4 branch.
    
    Discussion
    ----------
    
    [Console] Ensure terminal is usable after termination signal
    
    | Q             | A
    | ------------- | ---
    | Branch?       | 6.4
    | Bug fix?      | yes
    | New feature?  | no
    | Deprecations? | no
    | Issues        | Fix #61732
    | License       | MIT
    
    This PR introduces a new helper `TerminalInputHelper` that restores the terminal to its original state after it has been modified when reading using input. This ensures that the terminal is not broken when a terminating signal, like Ctrl-C, is received.
    
    QuestionHelper.php disables `icanon` and `echo` when accepting input from a selection, and disables `echo` when accepting hidden input. If these are not restored before termination, the user's terminal can end up in a broken state.
    
    Usage:
    ```php
    
    $inputHelper = new TerminalInputHelper($inputStream);
    
    // Change terminal settings then wait for input before all input reads
    $inputHelper->waitForInput();
    
    // Read the input then call finish to restore terminal settings and signal handlers
    $inputHelper->finish()
    ```
    
    The helper creates its own signal handlers (for `SIGINT`, `SIGQUIT`,  and `SIGTERM`) that restore the original terminal settings then call any original handler callback. If the original handler callback does not terminate the process then the current terminal settings are restored.
    
    If there is no original signal handler callback and the signal's disposition is set to the default action (`SIG_DFL`), then that action is invoked by a `posix_kill` call.
    
    The `finish` method restores the terminal settings and replaces the new signal handlers with the original ones.
    
    Commits
    -------
    
    fe75d75d22e [Console] Ensure terminal is usable after termination signal
    fabpot committed Oct 2, 2025
    Configuration menu
    Copy the full SHA
    80f8c48 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2025

  1. Configuration menu
    Copy the full SHA
    13d3176 View commit details
    Browse the repository at this point in the history
Loading