Disabling module with config sync and removing with composer I have an issue disabling modules, I've searched but cannot find something useful:
 - Developer A disable module and via composer remove it
 - I pull his changes so i run composer install that remove the code, then drush cim to update configuration, but it complains that the module is missing while it's trying to delete its configurations.

What's the right way to do this? I can't import config before running composer install because along the uninstalled module there could be also new modules needed for the configuration import.
You need two consecutive releases for stuff like that.

First release:

Your colleague uninstalls the module and commits the updated config.

If you don't manage your site via config use hook_update_N instead.

/**
 * Uninstall SOME_MODULE module.
 */
function MYMODULE_update_8001(&amp;$sandbox) {

  \Drupal::service('module_installer')-&gt;uninstall(['SOME_MODULE']);
}


Second release:

The module can be removed via Composer.



Related:

Order of drush commands for automated deployment?