Skip to content

Conversation

@IonBazan
Copy link
Contributor

@IonBazan IonBazan commented Sep 18, 2025

Resolves #12355

Adds update-with-minimal-changes config option which can be set on both global and project level, allowing to minimize impact of composer update.

The test is exactly the same as full-update-minimal-changes - simply added config entry there.

@Seldaek Seldaek added this to the 2.9 milestone Sep 18, 2025
@IonBazan IonBazan changed the title Add minimal-changes config option Add update-with-minimal-changes config option Sep 18, 2025
@IonBazan
Copy link
Contributor Author

Thanks for the review @Seldaek! I've updated the config key name and json schema. Unfortunately, I had to remove the test as it was not working - I realized it doesn't actually test the command but rather the underlying installer so the config was not applied there. I think a bigger change would be needed to test such scenario.

We could add an InstallerFactory which would create an instance of Installer from InputInterface and Config, resolving the parameters accordingly. Moving Installer instantiation would improve testability and reduce repetitions pointed out above and improve readability.

@Seldaek
Copy link
Member

Seldaek commented Sep 18, 2025

@IonBazan
Copy link
Contributor Author

InstallerTest creates their own simplified version of update command and mocks Config too. We could add support to read config from .test file and apply it to the mock but that still won't verify actual command behaviour.

Let me try to pick it up as an improvement in a separate PR, if that's ok 🙏🏻

@Seldaek
Copy link
Member

Seldaek commented Sep 18, 2025

yeah please don't mix this in this PR for sure :D Not sure if much can be done about this.. I don't really mind it's not using the real command, because these .test files are about testing the Installer class and the solver internals in integration, the command class is irrelevant here.

@Seldaek Seldaek merged commit 3c4932e into composer:main Sep 18, 2025
20 of 21 checks passed
@Seldaek
Copy link
Member

Seldaek commented Sep 18, 2025

Thanks

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.

JSON configuration equivalent of COMPOSER_MINIMAL_CHANGES env var

2 participants