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

If the cache:clear command fails after an installation, the content of composer.json is reverted #751

Closed
dunglas opened this issue Mar 29, 2021 · 2 comments

Comments

@dunglas
Copy link
Member

dunglas commented Mar 29, 2021

Steps to reproduce

symfony new test-hwi
cd test-hwi
composer require hwi/oauth-bundle symfony/http-client nyholm/psr7 guzzlehttp/promises php-http/httplug-bundle

Execute the community recipes when asked.
The cache:clear commands fails as expected (hwi/oauth-bundle requires extra manual configuration). The recipes files are correctly generated, however the installed packages are removed from composer.json.
Flex will then remove the related config files when the next composer require or composer update command will occur.

Possible fix

An error occurring during cache:clear shouldn't revert the content of composer.json.

Similar to #142.

@dunglas dunglas changed the title When the cache:clear command fails after an installation, composer.json content is reverted When the cache:clear command fails after an installation, composer.json content is reverted Mar 29, 2021
@dunglas dunglas changed the title When the cache:clear command fails after an installation, composer.json content is reverted When the cache:clear command fails after an installation, the content of composer.json is reverted Mar 29, 2021
@dunglas dunglas changed the title When the cache:clear command fails after an installation, the content of composer.json is reverted If the cache:clear command fails after an installation, the content of composer.json is reverted Mar 29, 2021
@nicolas-grekas
Copy link
Member

Fixed by #807

@nicolas-grekas
Copy link
Member

PR moved to composer, see composer/composer#10118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants