Howto upgrade selected package when composer.lock is present?

Viewed 1621

For an existing library with composer.json and composer.lock I'd like to upgrade a single dependency to a newer version and make this change minimally invasive.

Problem: if package to be upgraded requires downstream upgrades (A requires B, requires C) that's not possible due to composer.lock since the versions of B and C are fixed as well.

As workaround those can be recursively required in newer versions too, but end up in composer.json then and need be manually removed.

Is there a more efficient process to manage "minimal change" upgrade of selected requirements?

Note: I don't want to use composer update as this will likely change all locked versions if updates exist.

1 Answers
Related