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

Composer crashing on any question prompt in PHP 7.4 for Windows #8457

sspat opened this issue Nov 29, 2019 · 3 comments


Copy link

@sspat sspat commented Nov 29, 2019

My composer.json:

No composer.json file, crashes on composer init

Output of composer diagnose:

Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
Checking composer version: OK
Composer version: 1.9.1
PHP version: 7.4.0
PHP binary path: C:\work\php\current\php.exe

When I run this command:

composer init
or any other command that does a question prompt

I get the following output:

[Symfony\Component\Console\Exception\RuntimeException] Aborted

With -vvv:

 Welcome to the Composer config generator  

This command will guide you through creating your composer.json config.

Package name (<vendor>/<name>) [patrik/antifraud]:

Exception trace:
 () at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Helper/QuestionHelper.php:148
 Symfony\Component\Console\Helper\QuestionHelper->doAsk() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Helper/QuestionHelper.php:75
 Symfony\Component\Console\Helper\QuestionHelper->Symfony\Component\Console\Helper\{closure}() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Helper/QuestionHel
 Symfony\Component\Console\Helper\QuestionHelper->validateAttempts() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Helper/QuestionHelper.php:78
 Symfony\Component\Console\Helper\QuestionHelper->ask() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/IO/ConsoleIO.php:267
 Composer\IO\ConsoleIO->askAndValidate() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/InitCommand.php:240
 Composer\Command\InitCommand->interact() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Command/Command.php:230
 Symfony\Component\Console\Command\Command->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:835
 Symfony\Component\Console\Application->doRunCommand() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:185
 Symfony\Component\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:267
 Composer\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:106
 Composer\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/bin/composer:61
 require() at C:\ProgramData\ComposerSetup\bin\composer.phar:24

And I expected this to happen:
Expected being able to enter an answer to the prompt.
If I switch to PHP 7.3 everything is working.
If I run the same command with PHP 7.4 in Linux everything is working.


This comment has been minimized.

Copy link

@sspat sspat commented Nov 29, 2019

Looks like this is a PHP 7.4 issue, someone encountered it too:


This comment has been minimized.

Copy link

@stof stof commented Nov 29, 2019

handled at

The good news is that there is already a fix in progress at php/php-src#4952


This comment has been minimized.

Copy link

@alcohol alcohol commented Dec 2, 2019

Closing this as it does not look like a Composer issue to me. If you feel this is not justified, let me know why and if I should re-open this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.