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

fix: check input options presence when updating config from CLI #109

Merged

Conversation

Dartui
Copy link

@Dartui Dartui commented Jun 8, 2024

This PR fixes issue with config options being overwritten when parsing CLI options.

$input->hasOption method returns true for every input option that is configured (see Console/Commands/Compose@configure), even when input option is not passed from CLI.

Because of that when you are not setting deleteVendorPackages option from CLI, the composer.json extra config is overwritten before doing cleanup action. All input options are optional, so to preserve extra config we should not change values of the config when input option values equals to null.

@BrianHenryIE BrianHenryIE merged commit 7212a4d into BrianHenryIE:master Jun 10, 2024
@BrianHenryIE
Copy link
Owner

Thank you. I wrote a test for it too 7593385

@Dartui Dartui deleted the fix/check-input-option-presence branch June 11, 2024 07:05
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 this pull request may close these issues.

2 participants