Reputation: 23
In a new folder completely empty :
composer init
i have :
Welcome to the Composer config generator
This command will guide you through creating your composer.json config.
Package name (<vendor>/<name>) [slordef/test-composer]:
[Symfony\Component\Console\Exception\RuntimeException]
Aborted
init [--name NAME] [--description DESCRIPTION] [--author AUTHOR] [--type [TYPE]] [--homepage HOMEPAGE] [--require REQUIRE] [--require-dev REQUIRE-DEV] [-s|--stability STABILITY] [-l|--license LICENSE] [--repository REPOSITORY]
Composer is up to date... Dont know how it append
Upvotes: 2
Views: 2313
Reputation: 21
i had the same bug, but I after all I realized that it happens in the last version of php. Example: I am now using PHP 7.4 but when I switched to PHP 7.3.12 the bug was solved! So I could dare saying that for that specific bug the first thing to check is the version of PHP you're using whether is it stable of not..
Upvotes: 0
Reputation: 11
Uninstall and reinstall Composer. Note that when installing, set php version 7.0. * To environment variables. So your problem will be solved
Upvotes: 0
Reputation: 1237
This is probably a problem with PHP version 7.4, had to switch to version 7.3 to make it work
Upvotes: 2
Reputation: 23
by running :
composer init -vvv
get :
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/QuestionHelper.php:404 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:291 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
Upvotes: 0