Skip to content

Conversation

@elaman
Copy link

@elaman elaman commented Dec 6, 2025

Changes

Currently --minimal-changes flag is being applied to composer commands. It was recently introduced in PR #34218. This has caused following issue #39823. As a solution, new composerMinimalChanges configuration is introduced, which allows --minimal-changes to be optionally applied instead of being a default behavior.

Context

Please select one of the following:

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests, but ran on a real repository, or
  • Both unit tests + ran on a real repository

The public repository:

@cla-assistant
Copy link

cla-assistant bot commented Dec 6, 2025

CLA assistant check
All committers have signed the CLA.

@bobvandevijver
Copy link
Contributor

Thank you for opening this PR. I was just researching why renovate stopped creating the desired lock file maintenance and found this exact flag being used in the log. For completeness, composer even notifies about this being a mistake in this command.

The --minimal-changes option should be used with package arguments or after modifying composer.json requirements, otherwise it will likely not yield any dependency changes.

However, I do not think it should be made configurable in the way you suggest. It is great to use with the actual update commands, but it should never be used with the lock file maintance action.

@elaman
Copy link
Author

elaman commented Dec 8, 2025

@bobvandevijver my initial thought was to just undo the flag introduction. But given than it was already in the codebase, I thought of easy way of undoing it without removing it completely for folks who think its useful. This PR could be a first step, after which it can be reviewed and polished out.

Copy link
Collaborator

@RahulGautamSingh RahulGautamSingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the type to RenovateConfig instead .. it should get passed down from there where needed.

@elaman
Copy link
Author

elaman commented Dec 8, 2025

Add the type to RenovateConfig instead .. it should get passed down from there where needed.

Can you please be more specific? Thank you.

@RahulGautamSingh
Copy link
Collaborator

Can you please be more specific? Thank you.

Find the RenovateConfig interface in the code and add the composerMinimalChanges field in it. After this the rest of the type changes won't be necessary

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.

Make Composer CLI --minimal-changes flag a configuration option

3 participants