# su - www-data -s /bin/bash -c php7.4 /var/www/nextcloud/updater/updater.phar
Nextcloud Updater - version: v25.0.11-5-g06c1bad
Current version is 25.0.12.
No update available.
Nothing to do.
#
I doubt it,
unless there’s an issue with lib/versioncheck.php.
root@cloud-prep[10.10.10.82/24] 10:33:05 /var/www/nextcloud # cat lib/versioncheck.php
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016 Roeland Jago Douma <roeland@famdouma.nl>
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
// Show warning if a PHP version below 7.4 is used,
if (PHP_VERSION_ID < 70400) {
http_response_code(500);
echo 'This version of Nextcloud requires at least PHP 7.4<br/>';
echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.';
exit(1);
}
// Show warning if >= PHP 8.2 is used as Nextcloud is not compatible with >= PHP 8.2 for now
if (PHP_VERSION_ID >= 80200) {
http_response_code(500);
echo 'This version of Nextcloud is not compatible with PHP>=8.2.<br/>';
echo 'You are currently running ' . PHP_VERSION . '.';
exit(1);
}
root@cloud-prep[10.10.10.82/24] 10:33:12 /var/www/nextcloud #
Ok thanks.
It would be better if the updater printed a helpful message about it,
instead of “no updates available”,
but I guess there’s no easy way to do that,
unless the updater downloads some kind of manifest file of the next version?
So how would the updater know what and where you want to upgrade to?
I’m glad, that @SysKeeper and @kesselb already pointed out what to do (at least) if you want to upgrade to nc26+
this is true. at least it should be done after a major version reaches EOL.
from my understanding it doesn’t need to be complicate. you’ll put the requirements from the requirements-page into some temp-variables and compare those to the fitting variables from your system.
If everything matches? Fine! If not, print:
Update not possible because of PHP-version. Needed 8.1, given 7.4.
I’m sure this compability-check is already done somewhere in the code. It’s just missing the output.
could be a nice PR that you @ychaouche could file on GH.
So how would the updater know what and where you want to upgrade to?
I’m a bit confused.
I consider 26 to be a(n) (major) update of 25.
I don’t know how the updating thing works in any software.
My simple conception is,
as I speculated earlier,
that it would get update information from a well-known (constant) URL.
The updater client could send its version info,
and it would suffice for the API to point to the location of the next available update,
at its highest minor version,
to skip in-between minor versions,
or to the next (retro)compatible major version.
So if the installed version is,
say,
25.0.1,
it would point it to 25.0.12,
instead of 25.0.2.
But if the installed version is 25.0.12,
and this is the latest version of 25.x,
but there’s 26.x available,
it should update to 26.
Ok thank you all for clarifying.
If I install 8.2,
then I can no longer run the updater,
because it won’t run with 8.2.
So I guess the only solution is to download 26 manually anyway.