I haven't had much time to try to debug this, so some of what's below might be wrong/incomplete, but I wanted to get this issue opened ASAP given its nature... "can cause deletion" probably means "will cause" for those who use composer to keep plugins up to date.
To reproduce, I believe the steps are:
- Ensure plugin-installer v0.3.5 or earlier is installed:
composer require --update-no-dev roundcube/plugin-installer:0.3.5.
- Ensure that other packages are up to date (just to avoid confusion):
composer update --no-dev.
- Require/install a plugin which uses a
config.inc.php file, for example: composer require --update-no-dev radialapps/banner-ics.
- Modify its
config.inc.php file.
- Switch back to the latest version of plugin-installer, but don't install it yet:
composer require --no-install roundcube/plugin-installer.
- Note that the current state is one which will be common for those who use composer to keep packages up to date, but haven't yet updated to the latest plugin-installer.
- Update plugin-installer:
composer update --no-dev.
- Run
composer update --no-dev again. Nothing should happen, since an update was just completed above. Instead all plugin(s) installed with plugin-installer v0.3.5 or earlier are reinstalled from scratch:
- Something checks for the existence of
vendor/radialapps/banner-ics which does not exist.
plugins/banner-ics is recursively deleted (including any modified / config files).
plugins/banner-ics is created and populated. vendor/radialapps/banner-ics is also created (empty).
- Any on-first-install tasks are executed (
Do you want to activate the plugin?, creating a new config.inc.php file, SQL, etc.).
- Note that the plugin
config.inc.php file(s) have been deleted and replaced by initial configs.
Future runs of composer update --no-dev do not reinstall the plugin(s) apparently because vendor/authorname/pluginname now exists.
I'm guessing this is caused by #51, but I'm not at all sure.
I haven't had much time to try to debug this, so some of what's below might be wrong/incomplete, but I wanted to get this issue opened ASAP given its nature... "can cause deletion" probably means "will cause" for those who use composer to keep plugins up to date.
To reproduce, I believe the steps are:
composer require --update-no-dev roundcube/plugin-installer:0.3.5.composer update --no-dev.config.inc.phpfile, for example:composer require --update-no-dev radialapps/banner-ics.config.inc.phpfile.composer require --no-install roundcube/plugin-installer.composer update --no-dev.composer update --no-devagain. Nothing should happen, since an update was just completed above. Instead all plugin(s) installed with plugin-installer v0.3.5 or earlier are reinstalled from scratch:vendor/radialapps/banner-icswhich does not exist.plugins/banner-icsis recursively deleted (including any modified / config files).plugins/banner-icsis created and populated.vendor/radialapps/banner-icsis also created (empty).Do you want to activate the plugin?, creating a newconfig.inc.phpfile, SQL, etc.).config.inc.phpfile(s) have been deleted and replaced by initial configs.Future runs of
composer update --no-devdo not reinstall the plugin(s) apparently becausevendor/authorname/pluginnamenow exists.I'm guessing this is caused by #51, but I'm not at all sure.