You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
From what I can tell, what I wrote above is more-or-less correct.
When composer update starts, it updates its concept of currently-installed packages here which eventually calls ExtensionInstaller::getInstallPath() from LibraryInstaller::isInstalled() here.
getInstallPath()returns the vendor/authorname/pluginname directory since setRoundcubemailInstallPath() hasn't yet been called, and isInstalled() returns false if that directory doesn't exist, which will be the case if the plugin was installed with a version of plugin-installer prior to v0.3.6.
This later causes composer to call ExtensionInstaller::install() (instead of either nothing or ExtensionInstaller::update()) which doesn't preserve config files.
I'm not sure what the right fix is, since I don't really understand what #51 is improving (sending a mention to @mvorisek). Update ExtensionInstaller::getInstallPath()? Override isInstalled() in ExtensionInstaller or PluginInstaller?
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.php
file, for example:composer require --update-no-dev radialapps/banner-ics
.config.inc.php
file.composer require --no-install roundcube/plugin-installer
.composer update --no-dev
.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: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).Do you want to activate the plugin?
, creating a newconfig.inc.php
file, SQL, etc.).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 becausevendor/authorname/pluginname
now exists.I'm guessing this is caused by #51, but I'm not at all sure.
The text was updated successfully, but these errors were encountered: