- Issue created by @joachim namyslo
During the daring attempt to install Drupal CMS in its current version on a server with the web hosting panel Plesk, I noticed the following.
If the version of Composer installed on the host system is older than the minimum required for the automatic update (unfortunately I don't know which one that is), the standard error message The website encountered an unexpected error is displayed when calling the page admin/modules/automatic-update-extensions. Try again later. issued.
It would be better, especially for newcomers to the world of Drupal, to have a proper error message indicating that you should check the version of Composer and make sure that it corresponds to at least Composer 2.8.8.
I came across this because Plesk Obsidian Web Admin Edition
Version 18.0.68 Update No. 2 is still shipped with Composer Version 2.2.5 from 2022-01-21 17:25:25.
So we should make sure that a version check is installed here, which both checks whether Composer can be executed and points out that the Automatic Updates module can only be executed correctly if the version of Composer available on the server corresponds to a certain minimum version. In this way, even inexperienced users should have a chance to understand why this function of Drupal does not work. Finally, the file must be updated by the system administrator. However, it is difficult for new users to communicate this to their hoster or system administrator without a corresponding error message. That's why we should really make an effort here.
1. Make sure that Composer is installed and executable. The composer.phar or composer file should be in /usr/local/bin
2. Install Drupal CMS
3. Make sure you downgrade the executable that contains Composer to replace it with https://getcomposer.org/download/2.2.5/composer.phar
4. Make sure the file is executable
5. Then go to the page /admin/modules/automatic-update-extensions
current behavior: Currently, the error message The website encountered an unexpected error. Try again later is displayed and the error message Drupal\package_manager\Exception\ComposerNotReadyException: The Composer executable at /usr/local/bin/composer is invalid. Unable to determine Composer version in Drupal\package_manager\ComposerInspector->validateExecutable() (line 204 of ... /cms/web/modules/contrib/automatic_updates/package_manager/src/ComposerInspector.php). ends up in the watchdog log.
Expected behavior:
The error message on the page in question and the error message in the system log should clearly and understandably indicate to the user that they should check the version number and age of the composer command line tool and give a clear indication that the error that has occurred can be fixed by installing at least composer version 2.8.8 (or whichever version seems appropriate here). It should also be made clear that this can only be done by system administrators or hosting providers, so that inexperienced users know who to turn to.
Example of a working description:
The version of Composer installed on your system is too old. In order for the Automatic Updates module to work correctly, at least composer version 2.8.8 must be installed on your server. Please contact your system administrator or web hosting provider for further details.
You can find more details at: insert documentation page here.
reproduce
determine minmum for composer.phar version
write patch
document change
TBD
TBD
TBD
Active
4.0
Code