fix: Log that using an appinfo/install.php file is deprecated

appinfo/install.php is not part of the official documentation for
 application development but some apps are still using such a file.
 Log a message to deprecate this behavior, to be able to remove support
 for this later.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/53895/head
Côme Chilliet 2025-08-18 17:25:07 +07:00
parent 8ccf87f7a2
commit a25797330b
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A
1 changed files with 8 additions and 2 deletions

@ -558,8 +558,14 @@ class Installer {
$queue->add($job);
}
// Run appinfo/install.php
self::includeAppScript($appPath . '/appinfo/install.php');
// Run deprecated appinfo/install.php if any
$appInstallScriptPath = $appPath . '/appinfo/install.php';
if (file_exists($appInstallScriptPath)) {
$this->logger->warning('Using an appinfo/install.php file is deprecated. Application "{app}" still uses one.', [
'app' => $info['id'],
]);
self::includeAppScript($appInstallScriptPath);
}
\OC_App::executeRepairSteps($info['id'], $info['repair-steps']['install']);