We have the theoretical option to update Joomla via the CLI, however looking into this, I see several issues which are partially UX issues, partially bugs. I'm creating this issue, fully aware that this describes more than one problem, however I also think they are connected and should be described together. Yes, there are a few bug reports in here, but most of these are feature requests, so I'm marking it as such. Anyway, here we go:
Looking at our current CLI core update code, it seems as if the target for these features was not considered. If you are updating Joomla through the CLI, you are NOT clicking a button in the browser, surrounded by information about currently installed version and the update channel we are currently on. It is actually a feature that we would expect to be run by scripts and not strictly by people who have access to the backend of the site.
core:check-updates
does return the available version number, it does not return the currently installed version and more importantly, the actual update command core:update
doesn't return any version information.core:update
also hides most of the progress information by removing finished steps from the output again. To the user it looks like it is jumping from 1/8 Startup
to 3/8 Downloading update package
to 8/8 Cleaning up
autoload_psr4.php
file, resulting in errors after the upgrade.The core:update
command should be greatly extended and the core:check-updates
command should be deprecated. We should introduce a core:update:check
command, which when called without parameters, returns the currently installed version, the currently selected update channel and the latest available version. With the parameter --channel=<channel>
the update channel can be changed and in case of a custom URL, the --url=<url>
parameter has to be added. The command should not only change the setting in the configuration, but also update the updatesite, as necessary.
The core:update
command should be much more verbose with its output. It should display the currently installed version, the update channel and the version of the update which would be installed and should then ask for confirmation to actually run the update. This should be surpressable with a switch. The output should not be hidden in the progressbar and if given the verbose switch, it should actually provide additional information, maybe even down to the files copied. Another switch should allow to select which update to install. If the update process encounters errors, it should return hints at the basic issue to the console.
The process should delete the autoload_psr4.php properly. The code of the commands itself should really be reviewed and cleaned up. Right now it is pretty messy and could really benefit from a cleanup.
Labels |
Added:
Feature
No Code Attached Yet
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-01-08 20:06:11 |
Closed_By | ⇒ | Hackwar |
With the PRs #42601, #42597 and #42594 this issue is largely solved. Closing this.