Skip to content

Conversation

@Bakual
Copy link
Contributor

@Bakual Bakual commented Nov 19, 2025

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

@richard67
Copy link
Member

As it is a new feature, this PR has to be rebased to 6.1-dev.

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.
@Bakual Bakual changed the base branch from 5.4-dev to 6.1-dev November 20, 2025 08:14
@Bakual
Copy link
Contributor Author

Bakual commented Nov 20, 2025

As it is a new feature, this PR has to be rebased to 6.1-dev.

Done, but I think I broke the CI and you need to restart it :-)
Sorry for that.

@richard67 richard67 changed the title Allow the module updater to automatically delete obsolete files [6.1] Allow the module updater to automatically delete obsolete files Nov 20, 2025
@richard67
Copy link
Member

As it is a new feature, this PR has to be rebased to 6.1-dev.

Done, but I think I broke the CI and you need to restart it :-) Sorry for that.

@Bakual The easiest way to fix that is to commit a change. I've allowed myself to apply a necessary change (use __DEPLOY_VERSION__) so we did not need a dummy change for that.

@Bakual
Copy link
Contributor Author

Bakual commented Nov 20, 2025

Perfect, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants