-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[6.1] Allow the module updater to automatically delete obsolete files #46474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 6.1-dev
Are you sure you want to change the base?
Conversation
|
As it is a new feature, this PR has to be rebased to 6.1-dev. |
4f873f2 to
672d920
Compare
Added a property to track old installed files for updates. This allows the parseFiles() method to automatically remove deleted files. Same code is already used in plugin and component adapter.
672d920 to
5e56f68
Compare
Done, but I think I broke the CI and you need to restart it :-) |
@Bakual The easiest way to fix that is to commit a change. I've allowed myself to apply a necessary change (use |
|
Perfect, thanks! |
The installer for components and plugins already automatically delete files, which are no longer present in the extension manifest. The module installer doesn't do that for some reason.
This PR proposes to add this functionality as I think it's a helpful feature for extension developers. Otherwise one has to manage a script file to delete no longer used files.
Summary of Changes
Added a property to track old installed files for updates.
This allows the parseFiles() method to automatically remove deleted files.
The Same code is already used in plugin and component adapter.
Testing Instructions
Install a module which used to have a file or folder that got deleted. Make sure it's an update (the module was already installed before).
You can fake such a module by taking any module and remove a file or folder line in the manifest and then install it.
Actual result BEFORE applying this Pull Request
The removed files or folder in the manifest are still present on the webserver after the update
Expected result AFTER applying this Pull Request
The removed files or folder in the manifest are deleted on the webserver after the update
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed