Skip to content
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

Silence stream_isatty and posix_isatty #37122

Closed
wants to merge 1 commit into from

Commits on Jun 6, 2020

  1. Silence stream_isatty and posix_isatty

    It was actually silence before (and still is in 3.4), but we removed this later, thinking it's not needed anymore.
    
    Without this, user will get `XX bytes of buffered data lost during stream conversion` errors
    
    Simple reproducer:
    
    ```php
    (new Application())
        ->register('app')
        ->setCode(function(InputInterface $input, OutputInterface $output) {
            (new QuestionHelper())->ask($input, $output, (new Question('Foo?'))->setValidator(function () {
                throw new InvalidArgumentException('Foo!');
            }));
        })
        ->getApplication()
        ->setDefaultCommand('app', true)
        ->run()
    ;
    ```
    
    echo "foo\n" | php console-app.php
    ostrolucky committed Jun 6, 2020
    Configuration menu
    Copy the full SHA
    24dfdbe View commit details
    Browse the repository at this point in the history