[arch-commits] Commit in nextcloud/repos (14 files)
David Runge
dvzrv at gemini.archlinux.org
Tue Feb 15 23:25:00 UTC 2022
Date: Tuesday, February 15, 2022 @ 23:24:59
Author: dvzrv
Revision: 1133413
archrelease: copy trunk to community-testing-any
Added:
nextcloud/repos/community-testing-any/
nextcloud/repos/community-testing-any/PKGBUILD
(from rev 1133412, nextcloud/trunk/PKGBUILD)
nextcloud/repos/community-testing-any/apache.example.conf
(from rev 1133412, nextcloud/trunk/apache.example.conf)
nextcloud/repos/community-testing-any/nextcloud-23.0.0-php8.1.patch
(from rev 1133412, nextcloud/trunk/nextcloud-23.0.0-php8.1.patch)
nextcloud/repos/community-testing-any/nextcloud-23.0.0-pimple_php8.1.patch
(from rev 1133412, nextcloud/trunk/nextcloud-23.0.0-pimple_php8.1.patch)
nextcloud/repos/community-testing-any/nextcloud-cron.service
(from rev 1133412, nextcloud/trunk/nextcloud-cron.service)
nextcloud/repos/community-testing-any/nextcloud-cron.timer
(from rev 1133412, nextcloud/trunk/nextcloud-cron.timer)
nextcloud/repos/community-testing-any/nextcloud.config.php
(from rev 1133412, nextcloud/trunk/nextcloud.config.php)
nextcloud/repos/community-testing-any/nextcloud.hook
(from rev 1133412, nextcloud/trunk/nextcloud.hook)
nextcloud/repos/community-testing-any/nextcloud.install
(from rev 1133412, nextcloud/trunk/nextcloud.install)
nextcloud/repos/community-testing-any/nextcloud.occ.sh
(from rev 1133412, nextcloud/trunk/nextcloud.occ.sh)
nextcloud/repos/community-testing-any/nextcloud.sysusers
(from rev 1133412, nextcloud/trunk/nextcloud.sysusers)
nextcloud/repos/community-testing-any/nextcloud.tmpfiles
(from rev 1133412, nextcloud/trunk/nextcloud.tmpfiles)
nextcloud/repos/community-testing-any/nextcloud.uwsgi
(from rev 1133412, nextcloud/trunk/nextcloud.uwsgi)
--------------------------------------+
PKGBUILD | 142 ++
apache.example.conf | 21
nextcloud-23.0.0-php8.1.patch | 1664 +++++++++++++++++++++++++++++++++
nextcloud-23.0.0-pimple_php8.1.patch | 130 ++
nextcloud-cron.service | 9
nextcloud-cron.timer | 9
nextcloud.config.php | 17
nextcloud.hook | 13
nextcloud.install | 16
nextcloud.occ.sh | 45
nextcloud.sysusers | 1
nextcloud.tmpfiles | 9
nextcloud.uwsgi | 82 +
13 files changed, 2158 insertions(+)
Copied: nextcloud/repos/community-testing-any/PKGBUILD (from rev 1133412, nextcloud/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD (rev 0)
+++ community-testing-any/PKGBUILD 2022-02-15 23:24:59 UTC (rev 1133413)
@@ -0,0 +1,142 @@
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+pkgname=nextcloud
+# NOTE: do not package x.0.0 versions as they are considered beta
+pkgver=23.0.2
+pkgrel=1
+pkgdesc="A cloud server to store your files centrally on a hardware controlled by you"
+arch=(any)
+url="https://nextcloud.com"
+license=(AGPL3)
+depends=('php>=8.0.0' 'php<8.2.0' php-gd)
+optdepends=(
+ 'curl: for webcron jobs from within uwsgi'
+ 'ffmpeg: for preview generation'
+ 'libreoffice: for preview generation'
+ 'mariadb: to use a local MariaDB server'
+ 'memcached: to use a local memcached server'
+ 'php-apcu: for caching with APCU'
+ 'php-apache: to use the Apache web server'
+ 'mod_itk: to use the Apache web server'
+ 'php-fpm: to run in fastCGI process manager'
+ 'php-imagick: for preview generation'
+ 'php-imap: for external user authentication'
+ 'php-intl: to increase language translation performance and fix sorting'
+ 'php-memcached: for caching with memcached'
+ 'php-pgsql: to use the PostgreSQL database backend'
+ 'php-redis: for caching with redis'
+ 'php-sqlite: to use the SQLite database backend'
+ 'postgresql: to use a local PostgreSQL server'
+ 'redis: to use a local Redis server'
+ 'smbclient: for SMB/CIFS integration'
+ 'sudo: for privilege elevation in occ command when not run as root'
+ 'uwsgi-plugin-php: run as application container'
+)
+backup=(
+ "etc/webapps/${pkgname}/config/config.php"
+ "etc/webapps/${pkgname}/.htaccess"
+ "etc/uwsgi/${pkgname}.ini"
+)
+# there are no elf files, no need to strip anything
+options=(!strip)
+install="${pkgname}.install"
+source=(
+ "https://download.nextcloud.com/server/releases/nextcloud-${pkgver}.tar.bz2"{,.asc}
+ 'apache.example.conf'
+ "${pkgname}.config.php"
+ "${pkgname}.hook"
+ "${pkgname}.occ.sh"
+ "${pkgname}.sysusers"
+ "${pkgname}.tmpfiles"
+ "${pkgname}.uwsgi"
+ "${pkgname}-cron.service"
+ "${pkgname}-cron.timer"
+ "${pkgname}-23.0.0-php8.1.patch"
+ "${pkgname}-23.0.0-pimple_php8.1.patch"
+)
+sha512sums=('0c033a39a13daf2be1f6720908ca0052659995458ad6ab3c22147761a10d62da1ad0fb9f0c1090b4e8ba993729b95cad02e9b39b6a682a02c832329c2fbe68f9'
+ 'SKIP'
+ '5f9be223225e6ad2772989c440df8585a852ea0be697274384064ec73df47dab2f5d0847c275732fab26c419a713911d8f77ebc2b639bf6e8ede76272b752cde'
+ '92592f9a76ee534d0ae6d3aedf2257c147337debe7e2d6dbec1daff66a682e3abc74611e08662058de314bf3ea6ff1c85efd678674b782d71251c38786e446f9'
+ '7b18b73ee369607b8ee3d00d2a054262a7b8f3033fc4873eb333c9b9333d7338870c035910ae123b564a65d7d245730178137311048f0713d5bc524de3654923'
+ 'daae0331998fc3b135c18330cd8f8405958abce1a913cdbc16accc3c49f2b185a6d44cf4d768eb1eb11d1dd1d81dcc3fe75ec959bd9f4c9c5eb85c450d5ad408'
+ '1d06f339c43d57e5f5406c2698b815241fd9e39039a9e55f777face510c9a5ddae5ccd4e051393e8f16f391301a6aa03fff2462837a2d3441d969ea7195e7d84'
+ '919008a2bf6cf2492cb1e9c8e28c1e082d74e45da5a96e6669f8971d6cf721e36d23625c89918fe10d8bc1b202c0340aa897849d9ec501a26f3f4572ccb57a98'
+ '8bc7e76ba986cadf8d3bf35d6fbd8e7e236a61d1372e023c07e60427bacce925737c996d9fbaaeb51ed1066c1d0c8d83a86d7d640ed991b531744ed06629a670'
+ 'c585af280c2503a5a969fffd53d192a045a1dedd6d3a32901dfa0e226f9ddb4b5d1b1760553e962b061172c0077fcc57b095d8b7c70cafaa8ca84dbfce2eaa24'
+ 'eb69785a5b0df0e2a11f53f9c2e2dbf75681d7c698e88cbcc5ceed713a558d528511cc576813cc083cbaa28a2c83d543a39436ad4805670348ef22634305b1c8'
+ '13062af253ceaafa4a65cdbd808318c643acc654f60454b31674e4f03bf49d1b20c5d0b3907f1d520871819eccb141968470defb7e48c1c7fba450af12361b9b'
+ 'd5552d111f6632878173976987464723de222c45aeb529ad922590613a21586d54b8b5d55c056934a2c8998c08ea2e66c4c4d2fdda265f5372b5e87719770ceb')
+b2sums=('a0d4b8be3f76ea217711e3006346e4db7d9463fa3883a93630457db8675f64fdb33d34ef4cb54abb21bc6157ac01469bdb13986d61241e8da1e43646d9af9b96'
+ 'SKIP'
+ '7d40d120c28291f1a7537f3e1b5049fa83c9c0af949371345ea9ccdf3de4a0f3a3a06edbc52d9254dba483e4d11acf562cf679b9e379c5dfc2f61dfbfc2e4cef'
+ '4ad061efbc20b4d0e9f8cfd01c5e8e612fa5af29bce754b77f90c1835b98ee445ef4de3d8c83da91461053622620af14d880eb9014b51f2383c75f1860d479f4'
+ '772a9571fe7d88dbcbeb46351a188354e237dfe8e020131f2752b3a36cff0ff177423b4cfd6a1a5f28946f86a8581f3e24ee06ebda7260c5f862ca4071908e43'
+ '150273823fdadcaecf3e2af036067581cb4cf02507c6da2a533ef3c288a2a715d076f83c6d6d4ff13cd336184f595361318faa2acdc68979edfad7afef0b575b'
+ '1a61a89531636b65dade03cd7edca8747b3e1e880f9bbd4d5a53cffa452d70fe17e345cfed739ae92e99e336d4c1f2633c84a5c84a4ee6da518762bf1396b1db'
+ 'd132044cb7f1d61a1ce87800d2e1142e3ac385acdec25e2f5ad685603a0ffa88e105f4c35688584d65d287adbb40b8d9a02d6a80d7a0b58bb8801a6769405218'
+ '937ae5b89d968d784c7b68e1ca81e7aec11e295b95244fc4bcfec55b3d5f37ef70d5f593086eeb14101c8940a241565730cb6edcdf88165094c4ad27a89bd980'
+ '9857f3dd219b624869255e0d6c262b60de813b87ac4fd3fccad0a330392f55709e8c2d4b9dfb5ad19df7cc0fc13cc83cead06c9a1d893ee4e4972c4937df0c2b'
+ 'e6214351ca16bfe97683e838e727d6b5eaa62194878272204034c62aac4a632c9b33cd31aa0570c2eb936d7e9e7ff60190ac05a3a8cc2e27eda423a7d89b6d39'
+ 'd29c475db8a8fd083bf3981914a298d105484ee71e3dcbc9c726ea675b6f2dc56cf135850c22ac5231becdf1bcc6994ff645b179f7d14e0ace692e460ba2052b'
+ '3050c5c5f5befd044c892f67f1a194d42cb6ed9cd0b54d0a69258b26605da7f21bc781780e963846c26ece5fcf9f3987e832b4b1bbd8db91feea97fe4502c6d1')
+validpgpkeys=('28806A878AE423A28372792ED75899B9A724937A') # Nextcloud Security <security at nextcloud.com>
+
+prepare() {
+ cd "${pkgname}"
+ # add backported patch for php 8.1 support:
+ # https://github.com/nextcloud/server/pull/29432
+ # https://github.com/nextcloud/server/pull/29862
+ patch -Np1 -i ../"${pkgname}-23.0.0-php8.1.patch"
+ # add backported patch for php 8.1 support in pimple 3rdparty submodule:
+ # https://github.com/nextcloud/3rdparty/pull/905
+ (
+ cd 3rdparty
+ patch -Np1 -i ../../"${pkgname}-23.0.0-pimple_php8.1.patch"
+ )
+}
+
+package() {
+ cd "${pkgname}"
+ # sysusers.d integration
+ install -vDm 644 ../${pkgname}.sysusers \
+ "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
+ # tmpfiles.d integration
+ install -vDm 644 ../${pkgname}.tmpfiles \
+ "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
+ # state dir for data and writable apps
+ install -vdm 755 "${pkgdir}/var/lib/${pkgname}/"
+ install -vdm 770 "${pkgdir}/var/lib/${pkgname}/data"
+ install -vdm 755 "${pkgdir}/var/lib/${pkgname}/apps"
+ # log dir
+ install -vdm 755 "${pkgdir}/var/log/${pkgname}/"
+ # uwsgi integration
+ install -vDm 644 "../${pkgname}.uwsgi" "${pkgdir}/etc/uwsgi/${pkgname}.ini"
+ # config dir
+ install -vDm 644 .htaccess -t "${pkgdir}/etc/webapps/${pkgname}/"
+ install -vDm 640 "../${pkgname}.config.php" "${pkgdir}/etc/webapps/${pkgname}/config/config.php"
+ find config -type f -exec install -vDm 644 {} "${pkgdir}/etc/webapps/${pkgname}/"{} \;
+ # remove config dir and .htaccess from source so that it is not installed to default location
+ rm -rf config .htaccess
+
+ # webapp
+ find . -type f -not -iname "*.orig" -exec install -vDm 644 {} "${pkgdir}/usr/share/webapps/${pkgname}/"{} \;
+
+ # symlink config directory into place
+ ln -sv "/etc/webapps/${pkgname}/config" "${pkgdir}/usr/share/webapps/${pkgname}/"
+ # symlink .htaccess file into place
+ ln -sv "/etc/webapps/${pkgname}/.htaccess" "${pkgdir}/usr/share/webapps/${pkgname}/"
+ # add symlink to default writable apps directory
+ ln -sv "/var/lib/${pkgname}/apps" "${pkgdir}/usr/share/webapps/${pkgname}/wapps"
+ # install occ command
+ install -vDm 755 occ -t "${pkgdir}/usr/share/webapps/${pkgname}"
+ # occ script
+ install -vDm 755 "../${pkgname}.occ.sh" "${pkgdir}/usr/bin/occ"
+ # optional pacman hook
+ install -vDm 644 "../${pkgname}.hook" -t "${pkgdir}/usr/share/doc/${pkgname}/"
+ # apache example conf
+ install -vDm 644 ../apache.example.conf -t "${pkgdir}/usr/share/doc/${pkgname}/"
+ # systemd timer
+ install -vDm 644 ../${pkgname}-cron.{service,timer} -t "$pkgdir/usr/lib/systemd/system"
+}
Copied: nextcloud/repos/community-testing-any/apache.example.conf (from rev 1133412, nextcloud/trunk/apache.example.conf)
===================================================================
--- community-testing-any/apache.example.conf (rev 0)
+++ community-testing-any/apache.example.conf 2022-02-15 23:24:59 UTC (rev 1133413)
@@ -0,0 +1,21 @@
+<IfModule mod_alias.c>
+ Alias /nextcloud /usr/share/webapps/nextcloud/
+</IfModule>
+
+<Directory /usr/share/webapps/nextcloud/>
+ Options FollowSymlinks
+ AllowOverride all
+ Require all granted
+</Directory>
+
+<VirtualHost *:80>
+ ServerAdmin foo at foofarm.com
+ DocumentRoot /usr/share/webapps/nextcloud
+ ServerName nextcloud.foo.com
+ ErrorLog /var/log/httpd/nextcloud.foo.info-error_log
+ CustomLog /var/log/httpd/nextcloud.foo.info-access_log common
+</VirtualHost>
+
+<IfModule mpm_itk_module>
+ AssignUserId nextcloud nextcloud
+</IfModule>
Copied: nextcloud/repos/community-testing-any/nextcloud-23.0.0-php8.1.patch (from rev 1133412, nextcloud/trunk/nextcloud-23.0.0-php8.1.patch)
===================================================================
--- community-testing-any/nextcloud-23.0.0-php8.1.patch (rev 0)
+++ community-testing-any/nextcloud-23.0.0-php8.1.patch 2022-02-15 23:24:59 UTC (rev 1133413)
@@ -0,0 +1,1664 @@
+From 113756db30fcbffe9e90b54c29e78dee0676109f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet at nextcloud.com>
+Date: Tue, 19 Oct 2021 17:11:53 +0200
+Subject: [PATCH] Fix ArrayAccess and JsonSerializable return types
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+First round of modifications for PHP 8.1
+
+Signed-off-by: Côme Chilliet <come.chilliet at nextcloud.com>
+---
+ apps/files_external/lib/Lib/Auth/AuthMechanism.php | 4 +---
+ apps/files_external/lib/Lib/Backend/Backend.php | 4 +---
+ .../files_external/lib/Lib/DefinitionParameter.php | 4 +---
+ apps/files_external/lib/Lib/StorageConfig.php | 4 +---
+ apps/theming/lib/Service/JSDataService.php | 2 +-
+ apps/user_status/lib/Service/JSDataService.php | 2 +-
+ core/Command/Broadcast/Test.php | 2 +-
+ lib/private/Accounts/Account.php | 3 ++-
+ lib/private/Accounts/AccountProperty.php | 2 +-
+ lib/private/Accounts/AccountPropertyCollection.php | 2 +-
+ lib/private/AppFramework/Http/Request.php | 5 +++--
+ .../AppFramework/Utility/SimpleContainer.php | 8 +++++---
+ lib/private/Authentication/Token/DefaultToken.php | 2 +-
+ .../Authentication/Token/PublicKeyToken.php | 2 +-
+ lib/private/Cache/CappedMemoryCache.php | 10 +++++++---
+ .../Contacts/ContactsMenu/Actions/LinkAction.php | 5 +----
+ .../EventDispatcher/GenericEventWrapper.php | 14 +++++++++-----
+ lib/private/Files/Cache/CacheEntry.php | 10 +++++++---
+ lib/private/Files/FileInfo.php | 10 +++++++---
+ lib/private/FullTextSearch/Model/IndexDocument.php | 4 +---
+ .../Model/SearchRequestSimpleQuery.php | 3 +--
+ lib/private/L10N/L10NString.php | 6 +-----
+ lib/private/Memcache/Cache.php | 10 +++++++---
+ lib/private/Session/CryptoSessionData.php | 5 +++--
+ lib/private/Session/Session.php | 5 +++--
+ .../AppFramework/Services/InitialStateProvider.php | 2 ++
+ lib/public/Dashboard/Model/WidgetSetting.php | 4 +---
+ lib/public/Dashboard/Model/WidgetSetup.php | 4 +---
+ lib/public/Dashboard/Model/WidgetTemplate.php | 4 +---
+ lib/public/DirectEditing/ATemplate.php | 3 +--
+ lib/public/EventDispatcher/GenericEvent.php | 2 ++
+ lib/public/Files/Template/Template.php | 2 +-
+ lib/public/Files/Template/TemplateFileCreator.php | 2 +-
+ tests/lib/InitialStateServiceTest.php | 2 +-
+ 34 files changed, 79 insertions(+), 74 deletions(-)
+
+diff --git a/apps/files_external/lib/Lib/Auth/AuthMechanism.php b/apps/files_external/lib/Lib/Auth/AuthMechanism.php
+index f676957794d8..210dd705723e 100644
+--- a/apps/files_external/lib/Lib/Auth/AuthMechanism.php
++++ b/apps/files_external/lib/Lib/Auth/AuthMechanism.php
+@@ -90,10 +90,8 @@ public function setScheme($scheme) {
+
+ /**
+ * Serialize into JSON for client-side JS
+- *
+- * @return array
+ */
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ $data = $this->jsonSerializeDefinition();
+ $data += $this->jsonSerializeIdentifier();
+
+diff --git a/apps/files_external/lib/Lib/Backend/Backend.php b/apps/files_external/lib/Lib/Backend/Backend.php
+index a6e63eb30d19..021d208aed33 100644
+--- a/apps/files_external/lib/Lib/Backend/Backend.php
++++ b/apps/files_external/lib/Lib/Backend/Backend.php
+@@ -137,10 +137,8 @@ public function setLegacyAuthMechanismCallback(callable $callback) {
+
+ /**
+ * Serialize into JSON for client-side JS
+- *
+- * @return array
+ */
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ $data = $this->jsonSerializeDefinition();
+ $data += $this->jsonSerializeIdentifier();
+
+diff --git a/apps/files_external/lib/Lib/DefinitionParameter.php b/apps/files_external/lib/Lib/DefinitionParameter.php
+index fbfbbfd4686a..6b081d5a089f 100644
+--- a/apps/files_external/lib/Lib/DefinitionParameter.php
++++ b/apps/files_external/lib/Lib/DefinitionParameter.php
+@@ -167,10 +167,8 @@ public function setTooltip(string $tooltip) {
+
+ /**
+ * Serialize into JSON for client-side JS
+- *
+- * @return string
+ */
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [
+ 'value' => $this->getText(),
+ 'flags' => $this->getFlags(),
+diff --git a/apps/files_external/lib/Lib/StorageConfig.php b/apps/files_external/lib/Lib/StorageConfig.php
+index 97b72005018d..26ba483b00ef 100644
+--- a/apps/files_external/lib/Lib/StorageConfig.php
++++ b/apps/files_external/lib/Lib/StorageConfig.php
+@@ -396,10 +396,8 @@ public function setType($type) {
+
+ /**
+ * Serialize config to JSON
+- *
+- * @return array
+ */
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ $result = [];
+ if (!is_null($this->id)) {
+ $result['id'] = $this->id;
+diff --git a/apps/theming/lib/Service/JSDataService.php b/apps/theming/lib/Service/JSDataService.php
+index a6e5d6f8e365..1c4d138a7646 100644
+--- a/apps/theming/lib/Service/JSDataService.php
++++ b/apps/theming/lib/Service/JSDataService.php
+@@ -50,7 +50,7 @@ public function __construct(
+ $this->appConfig = $appConfig;
+ }
+
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [
+ 'name' => $this->themingDefaults->getName(),
+ 'url' => $this->themingDefaults->getBaseUrl(),
+diff --git a/apps/user_status/lib/Service/JSDataService.php b/apps/user_status/lib/Service/JSDataService.php
+index 6d83591ab2f4..c08643ec64fb 100644
+--- a/apps/user_status/lib/Service/JSDataService.php
++++ b/apps/user_status/lib/Service/JSDataService.php
+@@ -49,7 +49,7 @@ public function __construct(IUserSession $userSession,
+ $this->statusService = $statusService;
+ }
+
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ $user = $this->userSession->getUser();
+
+ if ($user === null) {
+diff --git a/core/Command/Broadcast/Test.php b/core/Command/Broadcast/Test.php
+index 91050725e176..86cd30e4b4c6 100644
+--- a/core/Command/Broadcast/Test.php
++++ b/core/Command/Broadcast/Test.php
+@@ -87,7 +87,7 @@ public function getUids(): array {
+ ];
+ }
+
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [
+ 'description' => 'this is a test event',
+ ];
+diff --git a/lib/private/Accounts/Account.php b/lib/private/Accounts/Account.php
+index 1e4189f2b35c..540d15cd4b9e 100644
+--- a/lib/private/Accounts/Account.php
++++ b/lib/private/Accounts/Account.php
+@@ -104,7 +104,8 @@ public function getFilteredProperties(string $scope = null, string $verified = n
+ return $result;
+ }
+
+- public function jsonSerialize() {
++ /** @return IAccountPropertyCollection[]|IAccountProperty[] */
++ public function jsonSerialize(): array {
+ return $this->properties;
+ }
+
+diff --git a/lib/private/Accounts/AccountProperty.php b/lib/private/Accounts/AccountProperty.php
+index 0e6356e9e92e..4b7f2b0c04c2 100644
+--- a/lib/private/Accounts/AccountProperty.php
++++ b/lib/private/Accounts/AccountProperty.php
+@@ -54,7 +54,7 @@ public function __construct(string $name, string $value, string $scope, string $
+ $this->verificationData = $verificationData;
+ }
+
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [
+ 'name' => $this->getName(),
+ 'value' => $this->getValue(),
+diff --git a/lib/private/Accounts/AccountPropertyCollection.php b/lib/private/Accounts/AccountPropertyCollection.php
+index 3aed76d8746a..091c5734218b 100644
+--- a/lib/private/Accounts/AccountPropertyCollection.php
++++ b/lib/private/Accounts/AccountPropertyCollection.php
+@@ -102,7 +102,7 @@ public function removePropertyByValue(string $value): IAccountPropertyCollection
+ return $this;
+ }
+
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [$this->collectionName => $this->properties];
+ }
+
+diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
+index a95fd208155c..c67500bcaa4e 100644
+--- a/lib/private/AppFramework/Http/Request.php
++++ b/lib/private/AppFramework/Http/Request.php
+@@ -199,6 +199,7 @@ public function offsetExists($offset): bool {
+ * @param string $offset
+ * @return mixed
+ */
++ #[\ReturnTypeWillChange]
+ public function offsetGet($offset) {
+ return isset($this->items['parameters'][$offset])
+ ? $this->items['parameters'][$offset]
+@@ -210,7 +211,7 @@ public function offsetGet($offset) {
+ * @param string $offset
+ * @param mixed $value
+ */
+- public function offsetSet($offset, $value) {
++ public function offsetSet($offset, $value): void {
+ throw new \RuntimeException('You cannot change the contents of the request object');
+ }
+
+@@ -218,7 +219,7 @@ public function offsetSet($offset, $value) {
+ * @see offsetExists
+ * @param string $offset
+ */
+- public function offsetUnset($offset) {
++ public function offsetUnset($offset): void {
+ throw new \RuntimeException('You cannot change the contents of the request object');
+ }
+
+diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php
+index c38dbadf0a97..598c66b6aba7 100644
+--- a/lib/private/AppFramework/Utility/SimpleContainer.php
++++ b/lib/private/AppFramework/Utility/SimpleContainer.php
+@@ -197,13 +197,15 @@ protected function sanitizeName($name) {
+ /**
+ * @deprecated 20.0.0 use \Psr\Container\ContainerInterface::has
+ */
+- public function offsetExists($id) {
++ public function offsetExists($id): bool {
+ return $this->container->offsetExists($id);
+ }
+
+ /**
+ * @deprecated 20.0.0 use \Psr\Container\ContainerInterface::get
++ * @return mixed
+ */
++ #[\ReturnTypeWillChange]
+ public function offsetGet($id) {
+ return $this->container->offsetGet($id);
+ }
+@@ -211,14 +213,14 @@ public function offsetGet($id) {
+ /**
+ * @deprecated 20.0.0 use \OCP\IContainer::registerService
+ */
+- public function offsetSet($id, $service) {
++ public function offsetSet($id, $service): void {
+ $this->container->offsetSet($id, $service);
+ }
+
+ /**
+ * @deprecated 20.0.0
+ */
+- public function offsetUnset($offset) {
++ public function offsetUnset($offset): void {
+ $this->container->offsetUnset($offset);
+ }
+ }
+diff --git a/lib/private/Authentication/Token/DefaultToken.php b/lib/private/Authentication/Token/DefaultToken.php
+index 5a008586a901..b649fdbb6aff 100644
+--- a/lib/private/Authentication/Token/DefaultToken.php
++++ b/lib/private/Authentication/Token/DefaultToken.php
+@@ -121,7 +121,7 @@ public function getPassword() {
+ return parent::getPassword();
+ }
+
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [
+ 'id' => $this->id,
+ 'name' => $this->name,
+diff --git a/lib/private/Authentication/Token/PublicKeyToken.php b/lib/private/Authentication/Token/PublicKeyToken.php
+index 3351c767ce3b..d060fe141032 100644
+--- a/lib/private/Authentication/Token/PublicKeyToken.php
++++ b/lib/private/Authentication/Token/PublicKeyToken.php
+@@ -138,7 +138,7 @@ public function getPassword() {
+ return parent::getPassword();
+ }
+
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [
+ 'id' => $this->id,
+ 'name' => $this->name,
+diff --git a/lib/private/Cache/CappedMemoryCache.php b/lib/private/Cache/CappedMemoryCache.php
+index 408c3935ffb9..584a53f0ff28 100644
+--- a/lib/private/Cache/CappedMemoryCache.php
++++ b/lib/private/Cache/CappedMemoryCache.php
+@@ -63,19 +63,23 @@ public function clear($prefix = '') {
+ return true;
+ }
+
+- public function offsetExists($offset) {
++ public function offsetExists($offset): bool {
+ return $this->hasKey($offset);
+ }
+
++ /**
++ * @return mixed
++ */
++ #[\ReturnTypeWillChange]
+ public function &offsetGet($offset) {
+ return $this->cache[$offset];
+ }
+
+- public function offsetSet($offset, $value) {
++ public function offsetSet($offset, $value): void {
+ $this->set($offset, $value);
+ }
+
+- public function offsetUnset($offset) {
++ public function offsetUnset($offset): void {
+ $this->remove($offset);
+ }
+
+diff --git a/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php b/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php
+index 5acafed2fdaf..3f917854aac8 100644
+--- a/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php
++++ b/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php
+@@ -106,10 +106,7 @@ public function getAppId(): string {
+ return $this->appId;
+ }
+
+- /**
+- * @return array
+- */
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [
+ 'title' => $this->name,
+ 'icon' => $this->icon,
+diff --git a/lib/private/EventDispatcher/GenericEventWrapper.php b/lib/private/EventDispatcher/GenericEventWrapper.php
+index 55e23d2ff7fa..3574bc8bb835 100644
+--- a/lib/private/EventDispatcher/GenericEventWrapper.php
++++ b/lib/private/EventDispatcher/GenericEventWrapper.php
+@@ -100,19 +100,23 @@ public function hasArgument($key) {
+ return $this->event->hasArgument($key);
+ }
+
++ /**
++ * @return mixed
++ */
++ #[\ReturnTypeWillChange]
+ public function offsetGet($key) {
+ return $this->event->offsetGet($key);
+ }
+
+- public function offsetSet($key, $value) {
+- return $this->event->offsetSet($key, $value);
++ public function offsetSet($key, $value): void {
++ $this->event->offsetSet($key, $value);
+ }
+
+- public function offsetUnset($key) {
+- return $this->event->offsetUnset($key);
++ public function offsetUnset($key): void {
++ $this->event->offsetUnset($key);
+ }
+
+- public function offsetExists($key) {
++ public function offsetExists($key): bool {
+ return $this->event->offsetExists($key);
+ }
+
+diff --git a/lib/private/Files/Cache/CacheEntry.php b/lib/private/Files/Cache/CacheEntry.php
+index 156f075c2d06..12f0273fb6e7 100644
+--- a/lib/private/Files/Cache/CacheEntry.php
++++ b/lib/private/Files/Cache/CacheEntry.php
+@@ -37,18 +37,22 @@ public function __construct(array $data) {
+ $this->data = $data;
+ }
+
+- public function offsetSet($offset, $value) {
++ public function offsetSet($offset, $value): void {
+ $this->data[$offset] = $value;
+ }
+
+- public function offsetExists($offset) {
++ public function offsetExists($offset): bool {
+ return isset($this->data[$offset]);
+ }
+
+- public function offsetUnset($offset) {
++ public function offsetUnset($offset): void {
+ unset($this->data[$offset]);
+ }
+
++ /**
++ * @return mixed
++ */
++ #[\ReturnTypeWillChange]
+ public function offsetGet($offset) {
+ if (isset($this->data[$offset])) {
+ return $this->data[$offset];
+diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php
+index 8a8de6e4c19b..2f361fc051db 100644
+--- a/lib/private/Files/FileInfo.php
++++ b/lib/private/Files/FileInfo.php
+@@ -104,18 +104,22 @@ public function __construct($path, $storage, $internalPath, $data, $mount, $owne
+ $this->rawSize = $this->data['size'] ?? 0;
+ }
+
+- public function offsetSet($offset, $value) {
++ public function offsetSet($offset, $value): void {
+ $this->data[$offset] = $value;
+ }
+
+- public function offsetExists($offset) {
++ public function offsetExists($offset): bool {
+ return isset($this->data[$offset]);
+ }
+
+- public function offsetUnset($offset) {
++ public function offsetUnset($offset): void {
+ unset($this->data[$offset]);
+ }
+
++ /**
++ * @return mixed
++ */
++ #[\ReturnTypeWillChange]
+ public function offsetGet($offset) {
+ if ($offset === 'type') {
+ return $this->getType();
+diff --git a/lib/private/FullTextSearch/Model/IndexDocument.php b/lib/private/FullTextSearch/Model/IndexDocument.php
+index a1648ab6e2ab..3078f12c4653 100644
+--- a/lib/private/FullTextSearch/Model/IndexDocument.php
++++ b/lib/private/FullTextSearch/Model/IndexDocument.php
+@@ -963,10 +963,8 @@ public function __destruct() {
+
+ /**
+ * @since 15.0.0
+- *
+- * @return array
+ */
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [
+ 'id' => $this->getId(),
+ 'providerId' => $this->getProviderId(),
+diff --git a/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php b/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php
+index 9c9ac71efa95..d6bfe6d91023 100644
+--- a/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php
++++ b/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php
+@@ -168,10 +168,9 @@ public function addValueBool(bool $value): ISearchRequestSimpleQuery {
+
+
+ /**
+- * @return array|mixed
+ * @since 17.0.0
+ */
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [
+ 'type' => $this->getType(),
+ 'field' => $this->getField(),
+diff --git a/lib/private/L10N/L10NString.php b/lib/private/L10N/L10NString.php
+index 33ccc4b14096..de4bc38d7442 100644
+--- a/lib/private/L10N/L10NString.php
++++ b/lib/private/L10N/L10NString.php
+@@ -82,11 +82,7 @@ public function __toString(): string {
+ return vsprintf($text, $this->parameters);
+ }
+
+-
+- /**
+- * @return string
+- */
+- public function jsonSerialize() {
++ public function jsonSerialize(): string {
+ return $this->__toString();
+ }
+ }
+diff --git a/lib/private/Memcache/Cache.php b/lib/private/Memcache/Cache.php
+index 95213c168497..1d54a705098e 100644
+--- a/lib/private/Memcache/Cache.php
++++ b/lib/private/Memcache/Cache.php
+@@ -78,19 +78,23 @@ abstract public function clear($prefix = '');
+
+ //implement the ArrayAccess interface
+
+- public function offsetExists($offset) {
++ public function offsetExists($offset): bool {
+ return $this->hasKey($offset);
+ }
+
+- public function offsetSet($offset, $value) {
++ public function offsetSet($offset, $value): void {
+ $this->set($offset, $value);
+ }
+
++ /**
++ * @return mixed
++ */
++ #[\ReturnTypeWillChange]
+ public function offsetGet($offset) {
+ return $this->get($offset);
+ }
+
+- public function offsetUnset($offset) {
++ public function offsetUnset($offset): void {
+ $this->remove($offset);
+ }
+ }
+diff --git a/lib/private/Session/CryptoSessionData.php b/lib/private/Session/CryptoSessionData.php
+index 94ad8f90dcfd..2e3bd46da5b4 100644
+--- a/lib/private/Session/CryptoSessionData.php
++++ b/lib/private/Session/CryptoSessionData.php
+@@ -195,6 +195,7 @@ public function offsetExists($offset): bool {
+ * @param mixed $offset
+ * @return mixed
+ */
++ #[\ReturnTypeWillChange]
+ public function offsetGet($offset) {
+ return $this->get($offset);
+ }
+@@ -203,14 +204,14 @@ public function offsetGet($offset) {
+ * @param mixed $offset
+ * @param mixed $value
+ */
+- public function offsetSet($offset, $value) {
++ public function offsetSet($offset, $value): void {
+ $this->set($offset, $value);
+ }
+
+ /**
+ * @param mixed $offset
+ */
+- public function offsetUnset($offset) {
++ public function offsetUnset($offset): void {
+ $this->remove($offset);
+ }
+ }
+diff --git a/lib/private/Session/Session.php b/lib/private/Session/Session.php
+index b9497983fbb0..affba322bec7 100644
+--- a/lib/private/Session/Session.php
++++ b/lib/private/Session/Session.php
+@@ -55,6 +55,7 @@ public function offsetExists($offset): bool {
+ * @param mixed $offset
+ * @return mixed
+ */
++ #[\ReturnTypeWillChange]
+ public function offsetGet($offset) {
+ return $this->get($offset);
+ }
+@@ -63,14 +64,14 @@ public function offsetGet($offset) {
+ * @param mixed $offset
+ * @param mixed $value
+ */
+- public function offsetSet($offset, $value) {
++ public function offsetSet($offset, $value): void {
+ $this->set($offset, $value);
+ }
+
+ /**
+ * @param mixed $offset
+ */
+- public function offsetUnset($offset) {
++ public function offsetUnset($offset): void {
+ $this->remove($offset);
+ }
+
+diff --git a/lib/public/AppFramework/Services/InitialStateProvider.php b/lib/public/AppFramework/Services/InitialStateProvider.php
+index c317fad3f5de..dbc486537924 100644
+--- a/lib/public/AppFramework/Services/InitialStateProvider.php
++++ b/lib/public/AppFramework/Services/InitialStateProvider.php
+@@ -42,7 +42,9 @@ abstract public function getData();
+
+ /**
+ * @since 21.0.0
++ * @return mixed
+ */
++ #[\ReturnTypeWillChange]
+ final public function jsonSerialize() {
+ return $this->getData();
+ }
+diff --git a/lib/public/Dashboard/Model/WidgetSetting.php b/lib/public/Dashboard/Model/WidgetSetting.php
+index c456c63f4f58..fce59a4350b6 100644
+--- a/lib/public/Dashboard/Model/WidgetSetting.php
++++ b/lib/public/Dashboard/Model/WidgetSetting.php
+@@ -230,10 +230,8 @@ public function getDefault(): string {
+ /**
+ * @since 15.0.0
+ * @deprecated 20.0.0
+- *
+- * @return array
+ */
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [
+ 'name' => $this->getName(),
+ 'title' => $this->getTitle(),
+diff --git a/lib/public/Dashboard/Model/WidgetSetup.php b/lib/public/Dashboard/Model/WidgetSetup.php
+index 1cc8d9ff561b..f3e09dcc71b1 100644
+--- a/lib/public/Dashboard/Model/WidgetSetup.php
++++ b/lib/public/Dashboard/Model/WidgetSetup.php
+@@ -261,10 +261,8 @@ public function setDefaultSettings(array $settings): WidgetSetup {
+ /**
+ * @since 15.0.0
+ * @deprecated 20.0.0
+- *
+- * @return array
+ */
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [
+ 'size' => $this->getSizes(),
+ 'menu' => $this->getMenuEntries(),
+diff --git a/lib/public/Dashboard/Model/WidgetTemplate.php b/lib/public/Dashboard/Model/WidgetTemplate.php
+index e6f9742fed7a..3521960c303c 100644
+--- a/lib/public/Dashboard/Model/WidgetTemplate.php
++++ b/lib/public/Dashboard/Model/WidgetTemplate.php
+@@ -312,10 +312,8 @@ public function getSetting(string $key): WidgetSetting {
+ /**
+ * @since 15.0.0
+ * @deprecated 20.0.0
+- *
+- * @return array
+ */
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [
+ 'icon' => $this->getIcon(),
+ 'css' => $this->getCss(),
+diff --git a/lib/public/DirectEditing/ATemplate.php b/lib/public/DirectEditing/ATemplate.php
+index c38fc898dab4..53aff0d40ffe 100644
+--- a/lib/public/DirectEditing/ATemplate.php
++++ b/lib/public/DirectEditing/ATemplate.php
+@@ -57,9 +57,8 @@ abstract public function getPreview(): string;
+
+ /**
+ * @since 18.0.0
+- * @return array|mixed
+ */
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [
+ 'id' => $this->getId(),
+ 'title' => $this->getTitle(),
+diff --git a/lib/public/EventDispatcher/GenericEvent.php b/lib/public/EventDispatcher/GenericEvent.php
+index e78ae1827a16..1ba1cc6da14f 100644
+--- a/lib/public/EventDispatcher/GenericEvent.php
++++ b/lib/public/EventDispatcher/GenericEvent.php
+@@ -156,7 +156,9 @@ public function offsetExists($offset): bool {
+ * @link https://php.net/manual/en/arrayaccess.offsetget.php
+ * @since 18.0.0
+ * @deprecated 22.0.0
++ * @return mixed
+ */
++ #[\ReturnTypeWillChange]
+ public function offsetGet($offset) {
+ return $this->arguments[$offset];
+ }
+diff --git a/lib/public/Files/Template/Template.php b/lib/public/Files/Template/Template.php
+index 50d8b406be9c..d71ef3b3655d 100644
+--- a/lib/public/Files/Template/Template.php
++++ b/lib/public/Files/Template/Template.php
+@@ -69,7 +69,7 @@ public function setHasPreview(bool $hasPreview): void {
+ /**
+ * @since 21.0.0
+ */
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [
+ 'templateType' => $this->templateType,
+ 'templateId' => $this->templateId,
+diff --git a/lib/public/Files/Template/TemplateFileCreator.php b/lib/public/Files/Template/TemplateFileCreator.php
+index 7be45e68ef9f..26edf585869d 100644
+--- a/lib/public/Files/Template/TemplateFileCreator.php
++++ b/lib/public/Files/Template/TemplateFileCreator.php
+@@ -106,7 +106,7 @@ public function getOrder(): int {
+ /**
+ * @since 21.0.0
+ */
+- public function jsonSerialize() {
++ public function jsonSerialize(): array {
+ return [
+ 'app' => $this->appId,
+ 'label' => $this->actionName,
+
+From 260be93a14af6eccb6240dfb3692073775da259e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet at nextcloud.com>
+Date: Tue, 19 Oct 2021 17:08:57 +0200
+Subject: [PATCH 01/12] Allow running Nextcloud with PHP 8.1
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Côme Chilliet <come.chilliet at nextcloud.com>
+---
+ lib/versioncheck.php | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/versioncheck.php b/lib/versioncheck.php
+index 4b1d9dec4d72..8aa68dd35fdd 100644
+--- a/lib/versioncheck.php
++++ b/lib/versioncheck.php
+@@ -33,10 +33,10 @@
+ exit(1);
+ }
+
+-// Show warning if > PHP 8.0 is used as Nextcloud is not compatible with > PHP 8.0 for now
+-if (PHP_VERSION_ID >= 80100) {
++// Show warning if > PHP 8.1 is used as Nextcloud is not compatible with > PHP 8.1 for now
++if (PHP_VERSION_ID > 80100) {
+ http_response_code(500);
+- echo 'This version of Nextcloud is not compatible with > PHP 8.0.<br/>';
++ echo 'This version of Nextcloud is not compatible with > PHP 8.1.<br/>';
+ echo 'You are currently running ' . PHP_VERSION . '.';
+ exit(1);
+ }
+
+From 37f8f7a5a18e57507330036b747d4b12e58efae4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet at nextcloud.com>
+Date: Tue, 26 Oct 2021 16:42:19 +0200
+Subject: [PATCH 03/12] Fix tests on PHP 8.1 for encryption, files_sharing,
+ files_version,
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+ files_trashbin and theming apps
+
+Signed-off-by: Côme Chilliet <come.chilliet at nextcloud.com>
+---
+ apps/encryption/lib/Command/FixEncryptedVersion.php | 5 +----
+ apps/encryption/tests/Crypto/EncryptAllTest.php | 5 ++++-
+ .../tests/Controller/PublicPreviewControllerTest.php | 4 ++++
+ .../tests/Controller/PreviewControllerTest.php | 2 ++
+ .../tests/Controller/PreviewControllerTest.php | 2 ++
+ apps/theming/tests/Controller/IconControllerTest.php | 2 ++
+ apps/theming/tests/Controller/ThemingControllerTest.php | 3 +++
+ 7 files changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/apps/encryption/lib/Command/FixEncryptedVersion.php b/apps/encryption/lib/Command/FixEncryptedVersion.php
+index d51f64c8ef91..073c1f1438a8 100644
+--- a/apps/encryption/lib/Command/FixEncryptedVersion.php
++++ b/apps/encryption/lib/Command/FixEncryptedVersion.php
+@@ -116,10 +116,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
+ $user = (string)$input->getArgument('user');
+ $pathToWalk = "/$user/files";
+
+- /**
+- * trim() returns an empty string when the argument is an unset/null
+- */
+- $pathOption = \trim($input->getOption('path'), '/');
++ $pathOption = \trim(($input->getOption('path') ?? ''), '/');
+ if ($pathOption !== "") {
+ $pathToWalk = "$pathToWalk/$pathOption";
+ }
+
+From f3dcbfe146782d2c7dec8760651e79605ddc96e7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet at nextcloud.com>
+Date: Tue, 26 Oct 2021 16:43:39 +0200
+Subject: [PATCH 04/12] Fix PHP 8.1 support for user_ldap application
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Côme Chilliet <come.chilliet at nextcloud.com>
+---
+ apps/user_ldap/lib/Access.php | 8 +-
+ apps/user_ldap/lib/Connection.php | 9 +-
+ apps/user_ldap/lib/Group_LDAP.php | 6 +-
+ apps/user_ldap/lib/Group_Proxy.php | 2 +-
+ apps/user_ldap/lib/IGroupLDAP.php | 2 +-
+ apps/user_ldap/lib/ILDAPWrapper.php | 60 ++++++------
+ apps/user_ldap/lib/IUserLDAP.php | 2 +-
+ apps/user_ldap/lib/LDAP.php | 92 +++++--------------
+ apps/user_ldap/lib/LDAPProvider.php | 4 +-
+ apps/user_ldap/lib/PagedResults/IAdapter.php | 4 +-
+ apps/user_ldap/lib/PagedResults/TLinkId.php | 12 ++-
+ apps/user_ldap/lib/User/Manager.php | 2 +-
+ apps/user_ldap/lib/User/User.php | 8 +-
+ apps/user_ldap/lib/User_LDAP.php | 2 +-
+ apps/user_ldap/lib/User_Proxy.php | 2 +-
+ apps/user_ldap/lib/Wizard.php | 6 +-
+ apps/user_ldap/tests/AccessTest.php | 2 +-
+ .../Integration/ExceptionOnLostConnection.php | 4 +-
+ 18 files changed, 96 insertions(+), 131 deletions(-)
+
+diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
+index 0af04747ded2..f79efe909968 100644
+--- a/apps/user_ldap/lib/Access.php
++++ b/apps/user_ldap/lib/Access.php
+@@ -260,7 +260,7 @@ public function readAttribute($dn, $attr, $filter = 'objectClass=*') {
+ /**
+ * Runs an read operation against LDAP
+ *
+- * @param resource $cr the LDAP connection
++ * @param resource|\LDAP\Connection $cr the LDAP connection
+ * @param string $dn
+ * @param string $attribute
+ * @param string $filter
+@@ -926,7 +926,7 @@ public function fetchListOfUsers(string $filter, array $attr, int $limit = null,
+ * @throws \Exception
+ */
+ public function batchApplyUserAttributes(array $ldapRecords) {
+- $displayNameAttribute = strtolower($this->connection->ldapUserDisplayName);
++ $displayNameAttribute = strtolower((string)$this->connection->ldapUserDisplayName);
+ foreach ($ldapRecords as $userRecord) {
+ if (!isset($userRecord[$displayNameAttribute])) {
+ // displayName is obligatory
+@@ -1186,7 +1186,7 @@ private function executeSearch(
+ /**
+ * processes an LDAP paged search operation
+ *
+- * @param resource $sr the array containing the LDAP search resources
++ * @param resource|\LDAP\Result|resource[]|\LDAP\Result[] $sr the array containing the LDAP search resources
+ * @param int $foundItems number of results in the single search operation
+ * @param int $limit maximum results to be counted
+ * @param bool $pagedSearchOK whether a paged search has been executed
+@@ -1303,7 +1303,7 @@ private function count(
+ }
+
+ /**
+- * @param resource $sr
++ * @param resource|\LDAP\Result|resource[]|\LDAP\Result[] $sr
+ * @return int
+ * @throws ServerNotAvailableException
+ */
+diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php
+index 77ae34f9f6c4..6666da1e933c 100644
+--- a/apps/user_ldap/lib/Connection.php
++++ b/apps/user_ldap/lib/Connection.php
+@@ -74,6 +74,9 @@
+ * @property string ldapMatchingRuleInChainState
+ */
+ class Connection extends LDAPUtility {
++ /**
++ * @var resource|\LDAP\Connection|null
++ */
+ private $ldapConnectionRes = null;
+ private $configPrefix;
+ private $configID;
+@@ -202,7 +205,7 @@ public function init($force = false) {
+ }
+
+ /**
+- * Returns the LDAP handler
++ * @return resource|\LDAP\Connection The LDAP resource
+ */
+ public function getConnectionResource() {
+ if (!$this->ldapConnectionRes) {
+@@ -408,7 +411,7 @@ private function doSoftValidation() {
+ }
+ }
+
+- if ((stripos($this->configuration->ldapHost, 'ldaps://') === 0)
++ if ((stripos((string)$this->configuration->ldapHost, 'ldaps://') === 0)
+ && $this->configuration->ldapTLS) {
+ $this->configuration->ldapTLS = false;
+ $this->logger->info(
+@@ -487,7 +490,7 @@ private function doCriticalValidation() {
+ $configurationOK = false;
+ }
+
+- if (mb_strpos($this->configuration->ldapLoginFilter, '%uid', 0, 'UTF-8')
++ if (mb_strpos((string)$this->configuration->ldapLoginFilter, '%uid', 0, 'UTF-8')
+ === false) {
+ $this->logger->warning(
+ $errorStr.'login filter does not contain %uid place holder.',
+diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php
+index 744f921c6dd3..9172b5fa25fc 100644
+--- a/apps/user_ldap/lib/Group_LDAP.php
++++ b/apps/user_ldap/lib/Group_LDAP.php
+@@ -83,7 +83,7 @@ public function __construct(Access $access, GroupPluginManager $groupPluginManag
+ $this->cachedNestedGroups = new CappedMemoryCache();
+ $this->groupPluginManager = $groupPluginManager;
+ $this->logger = OC::$server->get(LoggerInterface::class);
+- $this->ldapGroupMemberAssocAttr = strtolower($gAssoc);
++ $this->ldapGroupMemberAssocAttr = strtolower((string)$gAssoc);
+ }
+
+ /**
+@@ -202,7 +202,7 @@ public function inGroup($uid, $gid) {
+ * @throws ServerNotAvailableException
+ */
+ public function getDynamicGroupMembers(string $dnGroup): array {
+- $dynamicGroupMemberURL = strtolower($this->access->connection->ldapDynamicGroupMemberURL);
++ $dynamicGroupMemberURL = strtolower((string)$this->access->connection->ldapDynamicGroupMemberURL);
+
+ if (empty($dynamicGroupMemberURL)) {
+ return [];
+@@ -1312,7 +1312,7 @@ public function getGroupDetails($gid) {
+ * of the current access.
+ *
+ * @param string $gid
+- * @return resource of the LDAP connection
++ * @return resource|\LDAP\Connection The LDAP connection
+ * @throws ServerNotAvailableException
+ */
+ public function getNewLDAPConnection($gid) {
+diff --git a/apps/user_ldap/lib/Group_Proxy.php b/apps/user_ldap/lib/Group_Proxy.php
+index 3f9bb9013eb4..92a9041949e2 100644
+--- a/apps/user_ldap/lib/Group_Proxy.php
++++ b/apps/user_ldap/lib/Group_Proxy.php
+@@ -290,7 +290,7 @@ public function getLDAPAccess($gid) {
+ * The connection needs to be closed manually.
+ *
+ * @param string $gid
+- * @return resource of the LDAP connection
++ * @return resource|\LDAP\Connection The LDAP connection
+ */
+ public function getNewLDAPConnection($gid) {
+ return $this->handleRequest($gid, 'getNewLDAPConnection', [$gid]);
+diff --git a/apps/user_ldap/lib/IGroupLDAP.php b/apps/user_ldap/lib/IGroupLDAP.php
+index 33636dd8f552..2face1aa9074 100644
+--- a/apps/user_ldap/lib/IGroupLDAP.php
++++ b/apps/user_ldap/lib/IGroupLDAP.php
+@@ -36,7 +36,7 @@ public function getLDAPAccess($gid);
+ /**
+ * Return a new LDAP connection for the specified group.
+ * @param string $gid
+- * @return resource of the LDAP connection
++ * @return resource|\LDAP\Connection The LDAP connection
+ */
+ public function getNewLDAPConnection($gid);
+ }
+diff --git a/apps/user_ldap/lib/ILDAPWrapper.php b/apps/user_ldap/lib/ILDAPWrapper.php
+index c82df09d2345..9917898a001b 100644
+--- a/apps/user_ldap/lib/ILDAPWrapper.php
++++ b/apps/user_ldap/lib/ILDAPWrapper.php
+@@ -35,7 +35,7 @@ interface ILDAPWrapper {
+
+ /**
+ * Bind to LDAP directory
+- * @param resource $link LDAP link resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
+ * @param string $dn an RDN to log in with
+ * @param string $password the password
+ * @return bool true on success, false otherwise
+@@ -54,7 +54,7 @@ public function connect($host, $port);
+
+ /**
+ * Send LDAP pagination control
+- * @param resource $link LDAP link resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
+ * @param int $pageSize number of results per page
+ * @param bool $isCritical Indicates whether the pagination is critical of not.
+ * @param string $cookie structure sent by LDAP server
+@@ -64,8 +64,8 @@ public function controlPagedResult($link, $pageSize, $isCritical);
+
+ /**
+ * Retrieve the LDAP pagination cookie
+- * @param resource $link LDAP link resource
+- * @param resource $result LDAP result resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
++ * @param resource|\LDAP\Result $result LDAP result resource
+ * @param string $cookie structure sent by LDAP server
+ * @return bool true on success, false otherwise
+ *
+@@ -75,22 +75,22 @@ public function controlPagedResultResponse($link, $result, &$cookie);
+
+ /**
+ * Count the number of entries in a search
+- * @param resource $link LDAP link resource
+- * @param resource $result LDAP result resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
++ * @param resource|\LDAP\Result $result LDAP result resource
+ * @return int|false number of results on success, false otherwise
+ */
+ public function countEntries($link, $result);
+
+ /**
+ * Return the LDAP error number of the last LDAP command
+- * @param resource $link LDAP link resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
+ * @return int error code
+ */
+ public function errno($link);
+
+ /**
+ * Return the LDAP error message of the last LDAP command
+- * @param resource $link LDAP link resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
+ * @return string error message
+ */
+ public function error($link);
+@@ -106,69 +106,69 @@ public function explodeDN($dn, $withAttrib);
+
+ /**
+ * Return first result id
+- * @param resource $link LDAP link resource
+- * @param resource $result LDAP result resource
+- * @return Resource an LDAP search result resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
++ * @param resource|\LDAP\Result $result LDAP result resource
++ * @return resource|\LDAP\ResultEntry an LDAP entry resource
+ * */
+ public function firstEntry($link, $result);
+
+ /**
+ * Get attributes from a search result entry
+- * @param resource $link LDAP link resource
+- * @param resource $result LDAP result resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
++ * @param resource|\LDAP\ResultEntry $result LDAP result resource
+ * @return array containing the results, false on error
+ * */
+ public function getAttributes($link, $result);
+
+ /**
+ * Get the DN of a result entry
+- * @param resource $link LDAP link resource
+- * @param resource $result LDAP result resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
++ * @param resource|\LDAP\ResultEntry $result LDAP result resource
+ * @return string containing the DN, false on error
+ */
+ public function getDN($link, $result);
+
+ /**
+ * Get all result entries
+- * @param resource $link LDAP link resource
+- * @param resource $result LDAP result resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
++ * @param resource|\LDAP\Result $result LDAP result resource
+ * @return array containing the results, false on error
+ */
+ public function getEntries($link, $result);
+
+ /**
+ * Return next result id
+- * @param resource $link LDAP link resource
+- * @param resource $result LDAP entry result resource
+- * @return resource an LDAP search result resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
++ * @param resource|\LDAP\ResultEntry $result LDAP result resource
++ * @return resource|\LDAP\ResultEntry an LDAP entry resource
+ * */
+ public function nextEntry($link, $result);
+
+ /**
+ * Read an entry
+- * @param resource $link LDAP link resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
+ * @param array $baseDN The DN of the entry to read from
+ * @param string $filter An LDAP filter
+ * @param array $attr array of the attributes to read
+- * @return resource an LDAP search result resource
++ * @return resource|\LDAP\Result an LDAP search result resource
+ */
+ public function read($link, $baseDN, $filter, $attr);
+
+ /**
+ * Search LDAP tree
+- * @param resource $link LDAP link resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
+ * @param string $baseDN The DN of the entry to read from
+ * @param string $filter An LDAP filter
+ * @param array $attr array of the attributes to read
+ * @param int $attrsOnly optional, 1 if only attribute types shall be returned
+ * @param int $limit optional, limits the result entries
+- * @return resource|false an LDAP search result resource, false on error
++ * @return resource|\LDAP\Result|false an LDAP search result resource, false on error
+ */
+ public function search($link, $baseDN, $filter, $attr, $attrsOnly = 0, $limit = 0);
+
+ /**
+ * Replace the value of a userPassword by $password
+- * @param resource $link LDAP link resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
+ * @param string $userDN the DN of the user whose password is to be replaced
+ * @param string $password the new value for the userPassword
+ * @return bool true on success, false otherwise
+@@ -177,7 +177,7 @@ public function modReplace($link, $userDN, $password);
+
+ /**
+ * Sets the value of the specified option to be $value
+- * @param resource $link LDAP link resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
+ * @param string $option a defined LDAP Server option
+ * @param int $value the new value for the option
+ * @return bool true on success, false otherwise
+@@ -186,14 +186,14 @@ public function setOption($link, $option, $value);
+
+ /**
+ * establish Start TLS
+- * @param resource $link LDAP link resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
+ * @return bool true on success, false otherwise
+ */
+ public function startTls($link);
+
+ /**
+ * Unbind from LDAP directory
+- * @param resource $link LDAP link resource
++ * @param resource|\LDAP\Connection $link LDAP link resource
+ * @return bool true on success, false otherwise
+ */
+ public function unbind($link);
+@@ -208,8 +208,8 @@ public function areLDAPFunctionsAvailable();
+
+ /**
+ * Checks whether the submitted parameter is a resource
+- * @param resource $resource the resource variable to check
+- * @return bool true if it is a resource, false otherwise
++ * @param mixed $resource the resource variable to check
++ * @return bool true if it is a resource or LDAP object, false otherwise
+ */
+ public function isResource($resource);
+ }
+diff --git a/apps/user_ldap/lib/IUserLDAP.php b/apps/user_ldap/lib/IUserLDAP.php
+index 201bbfd75a22..dfba11c5d343 100644
+--- a/apps/user_ldap/lib/IUserLDAP.php
++++ b/apps/user_ldap/lib/IUserLDAP.php
+@@ -37,7 +37,7 @@ public function getLDAPAccess($uid);
+ /**
+ * Return a new LDAP connection for the specified user.
+ * @param string $uid
+- * @return resource of the LDAP connection
++ * @return resource|\LDAP\Connection of the LDAP connection
+ */
+ public function getNewLDAPConnection($uid);
+
+diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php
+index 900f5a7030f7..e33facd0889e 100644
+--- a/apps/user_ldap/lib/LDAP.php
++++ b/apps/user_ldap/lib/LDAP.php
+@@ -51,19 +51,14 @@ public function __construct(string $logFile = '') {
+ }
+
+ /**
+- * @param resource $link
+- * @param string $dn
+- * @param string $password
+- * @return bool|mixed
++ * {@inheritDoc}
+ */
+ public function bind($link, $dn, $password) {
+ return $this->invokeLDAPMethod('bind', $link, $dn, $password);
+ }
+
+ /**
+- * @param string $host
+- * @param string $port
+- * @return mixed
++ * {@inheritDoc}
+ */
+ public function connect($host, $port) {
+ if (strpos($host, '://') === false) {
+@@ -76,6 +71,9 @@ public function connect($host, $port) {
+ return $this->invokeLDAPMethod('connect', $host);
+ }
+
++ /**
++ * {@inheritDoc}
++ */
+ public function controlPagedResultResponse($link, $result, &$cookie): bool {
+ $this->preFunctionCall(
+ $this->pagedResultsAdapter->getResponseCallFunc(),
+@@ -93,10 +91,7 @@ public function controlPagedResultResponse($link, $result, &$cookie): bool {
+ }
+
+ /**
+- * @param LDAP $link
+- * @param int $pageSize
+- * @param bool $isCritical
+- * @return mixed|true
++ * {@inheritDoc}
+ */
+ public function controlPagedResult($link, $pageSize, $isCritical) {
+ $fn = $this->pagedResultsAdapter->getRequestCallFunc();
+@@ -116,25 +111,21 @@ public function controlPagedResult($link, $pageSize, $isCritical) {
+ }
+
+ /**
+- * @param LDAP $link
+- * @param LDAP $result
+- * @return mixed
++ * {@inheritDoc}
+ */
+ public function countEntries($link, $result) {
+ return $this->invokeLDAPMethod('count_entries', $link, $result);
+ }
+
+ /**
+- * @param LDAP $link
+- * @return integer
++ * {@inheritDoc}
+ */
+ public function errno($link) {
+ return $this->invokeLDAPMethod('errno', $link);
+ }
+
+ /**
+- * @param LDAP $link
+- * @return string
++ * {@inheritDoc}
+ */
+ public function error($link) {
+ return $this->invokeLDAPMethod('error', $link);
+@@ -152,56 +143,42 @@ public function explodeDN($dn, $withAttrib) {
+ }
+
+ /**
+- * @param LDAP $link
+- * @param LDAP $result
+- * @return mixed
++ * {@inheritDoc}
+ */
+ public function firstEntry($link, $result) {
+ return $this->invokeLDAPMethod('first_entry', $link, $result);
+ }
+
+ /**
+- * @param LDAP $link
+- * @param LDAP $result
+- * @return array|mixed
++ * {@inheritDoc}
+ */
+ public function getAttributes($link, $result) {
+ return $this->invokeLDAPMethod('get_attributes', $link, $result);
+ }
+
+ /**
+- * @param LDAP $link
+- * @param LDAP $result
+- * @return mixed|string
++ * {@inheritDoc}
+ */
+ public function getDN($link, $result) {
+ return $this->invokeLDAPMethod('get_dn', $link, $result);
+ }
+
+ /**
+- * @param LDAP $link
+- * @param LDAP $result
+- * @return array|mixed
++ * {@inheritDoc}
+ */
+ public function getEntries($link, $result) {
+ return $this->invokeLDAPMethod('get_entries', $link, $result);
+ }
+
+ /**
+- * @param LDAP $link
+- * @param resource $result
+- * @return mixed
++ * {@inheritDoc}
+ */
+ public function nextEntry($link, $result) {
+ return $this->invokeLDAPMethod('next_entry', $link, $result);
+ }
+
+ /**
+- * @param LDAP $link
+- * @param string $baseDN
+- * @param string $filter
+- * @param array $attr
+- * @return mixed
++ * {@inheritDoc}
+ */
+ public function read($link, $baseDN, $filter, $attr) {
+ $this->pagedResultsAdapter->setReadArgs($link, $baseDN, $filter, $attr);
+@@ -209,14 +186,7 @@ public function read($link, $baseDN, $filter, $attr) {
+ }
+
+ /**
+- * @param LDAP $link
+- * @param string[] $baseDN
+- * @param string $filter
+- * @param array $attr
+- * @param int $attrsOnly
+- * @param int $limit
+- * @return mixed
+- * @throws \Exception
++ * {@inheritDoc}
+ */
+ public function search($link, $baseDN, $filter, $attr, $attrsOnly = 0, $limit = 0) {
+ $oldHandler = set_error_handler(function ($no, $message, $file, $line) use (&$oldHandler) {
+@@ -239,47 +209,35 @@ public function search($link, $baseDN, $filter, $attr, $attrsOnly = 0, $limit =
+ }
+
+ /**
+- * @param LDAP $link
+- * @param string $userDN
+- * @param string $password
+- * @return bool
++ * {@inheritDoc}
+ */
+ public function modReplace($link, $userDN, $password) {
+ return $this->invokeLDAPMethod('mod_replace', $link, $userDN, ['userPassword' => $password]);
+ }
+
+ /**
+- * @param LDAP $link
+- * @param string $userDN
+- * @param string $oldPassword
+- * @param string $password
+- * @return bool
++ * {@inheritDoc}
+ */
+ public function exopPasswd($link, $userDN, $oldPassword, $password) {
+ return $this->invokeLDAPMethod('exop_passwd', $link, $userDN, $oldPassword, $password);
+ }
+
+ /**
+- * @param LDAP $link
+- * @param string $option
+- * @param int $value
+- * @return bool|mixed
++ * {@inheritDoc}
+ */
+ public function setOption($link, $option, $value) {
+ return $this->invokeLDAPMethod('set_option', $link, $option, $value);
+ }
+
+ /**
+- * @param LDAP $link
+- * @return mixed|true
++ * {@inheritDoc}
+ */
+ public function startTls($link) {
+ return $this->invokeLDAPMethod('start_tls', $link);
+ }
+
+ /**
+- * @param resource $link
+- * @return bool|mixed
++ * {@inheritDoc}
+ */
+ public function unbind($link) {
+ return $this->invokeLDAPMethod('unbind', $link);
+@@ -294,12 +252,10 @@ public function areLDAPFunctionsAvailable() {
+ }
+
+ /**
+- * Checks whether the submitted parameter is a resource
+- * @param Resource $resource the resource variable to check
+- * @return bool true if it is a resource, false otherwise
++ * {@inheritDoc}
+ */
+ public function isResource($resource) {
+- return is_resource($resource);
++ return is_resource($resource) || is_object($resource);
+ }
+
+ /**
+@@ -368,7 +324,7 @@ private function preFunctionCall($functionName, $args) {
+ /**
+ * Analyzes the returned LDAP error and acts accordingly if not 0
+ *
+- * @param resource $resource the LDAP Connection resource
++ * @param resource|\LDAP\Connection $resource the LDAP Connection resource
+ * @throws ConstraintViolationException
+ * @throws ServerNotAvailableException
+ * @throws \Exception
+diff --git a/apps/user_ldap/lib/LDAPProvider.php b/apps/user_ldap/lib/LDAPProvider.php
+index dd86ce486ac9..751ebf687684 100644
+--- a/apps/user_ldap/lib/LDAPProvider.php
++++ b/apps/user_ldap/lib/LDAPProvider.php
+@@ -149,7 +149,7 @@ public function sanitizeDN($dn) {
+ * Return a new LDAP connection resource for the specified user.
+ * The connection must be closed manually.
+ * @param string $uid user id
+- * @return resource of the LDAP connection
++ * @return resource|\LDAP\Connection The LDAP connection
+ * @throws \Exception if user id was not found in LDAP
+ */
+ public function getLDAPConnection($uid) {
+@@ -163,7 +163,7 @@ public function getLDAPConnection($uid) {
+ * Return a new LDAP connection resource for the specified user.
+ * The connection must be closed manually.
+ * @param string $gid group id
+- * @return resource of the LDAP connection
++ * @return resource|\LDAP\Connection The LDAP connection
+ * @throws \Exception if group id was not found in LDAP
+ */
+ public function getGroupLDAPConnection($gid) {
+diff --git a/apps/user_ldap/lib/PagedResults/IAdapter.php b/apps/user_ldap/lib/PagedResults/IAdapter.php
+index 2dd9ffe80a16..31338126e405 100644
+--- a/apps/user_ldap/lib/PagedResults/IAdapter.php
++++ b/apps/user_ldap/lib/PagedResults/IAdapter.php
+@@ -82,7 +82,7 @@ public function getResponseCallArgs(array $originalArgs): array;
+ /**
+ * the adapter should do it's LDAP function call and return success state
+ *
+- * @param resource $link LDAP resource
++ * @param resource|\LDAP\Connection $link LDAP resource
+ * @return bool
+ */
+ public function responseCall($link): bool;
+@@ -123,7 +123,7 @@ public function getReadArgs($link): array;
+ /**
+ * Returns the current paged results cookie
+ *
+- * @param resource $link LDAP resource
++ * @param resource|\LDAP\Connection $link LDAP resource
+ * @return string
+ */
+ public function getCookie($link): string;
+diff --git a/apps/user_ldap/lib/PagedResults/TLinkId.php b/apps/user_ldap/lib/PagedResults/TLinkId.php
+index 6f320705e67e..02c36da97f92 100644
+--- a/apps/user_ldap/lib/PagedResults/TLinkId.php
++++ b/apps/user_ldap/lib/PagedResults/TLinkId.php
+@@ -28,10 +28,16 @@
+
+ trait TLinkId {
+ public function getLinkId($link) {
+- if (is_resource($link)) {
++ if (is_object($link)) {
++ return spl_object_id($link);
++ } elseif (is_resource($link)) {
+ return (int)$link;
+- } elseif (is_array($link) && isset($link[0]) && is_resource($link[0])) {
+- return (int)$link[0];
++ } elseif (is_array($link) && isset($link[0])) {
++ if (is_object($link[0])) {
++ return spl_object_id($link[0]);
++ } elseif (is_resource($link[0])) {
++ return (int)$link[0];
++ }
+ }
+ throw new \RuntimeException('No resource provided');
+ }
+diff --git a/apps/user_ldap/lib/User/Manager.php b/apps/user_ldap/lib/User/Manager.php
+index 63af3cf17709..e752b113e3f1 100644
+--- a/apps/user_ldap/lib/User/Manager.php
++++ b/apps/user_ldap/lib/User/Manager.php
+@@ -177,7 +177,7 @@ public function getAttributes($minimal = false) {
+ $this->access->getConnection()->ldapExtStorageHomeAttribute,
+ ];
+
+- $homeRule = $this->access->getConnection()->homeFolderNamingRule;
++ $homeRule = (string)$this->access->getConnection()->homeFolderNamingRule;
+ if (strpos($homeRule, 'attr:') === 0) {
+ $attributes[] = substr($homeRule, strlen('attr:'));
+ }
+diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php
+index a0955f94bb4f..ab1500ff3689 100644
+--- a/apps/user_ldap/lib/User/User.php
++++ b/apps/user_ldap/lib/User/User.php
+@@ -464,9 +464,9 @@ public function updateEmail($valueFromLDAP = null) {
+ * bytes), '1234 MB' (quota in MB - check the \OC_Helper::computerFileSize method for more info)
+ *
+ * fetches the quota from LDAP and stores it as Nextcloud user value
+- * @param string $valueFromLDAP the quota attribute's value can be passed,
++ * @param ?string $valueFromLDAP the quota attribute's value can be passed,
+ * to save the readAttribute request
+- * @return null
++ * @return void
+ */
+ public function updateQuota($valueFromLDAP = null) {
+ if ($this->wasRefreshed('quota')) {
+@@ -487,7 +487,7 @@ public function updateQuota($valueFromLDAP = null) {
+ } elseif (is_array($aQuota) && isset($aQuota[0])) {
+ $this->logger->debug('no suitable LDAP quota found for user ' . $this->uid . ': [' . $aQuota[0] . ']', ['app' => 'user_ldap']);
+ }
+- } elseif ($this->verifyQuotaValue($valueFromLDAP)) {
++ } elseif (!is_null($valueFromLDAP) && $this->verifyQuotaValue($valueFromLDAP)) {
+ $quota = $valueFromLDAP;
+ } else {
+ $this->logger->debug('no suitable LDAP quota found for user ' . $this->uid . ': [' . $valueFromLDAP . ']', ['app' => 'user_ldap']);
+@@ -509,7 +509,7 @@ public function updateQuota($valueFromLDAP = null) {
+ }
+ }
+
+- private function verifyQuotaValue($quotaValue) {
++ private function verifyQuotaValue(string $quotaValue) {
+ return $quotaValue === 'none' || $quotaValue === 'default' || \OC_Helper::computerFileSize($quotaValue) !== false;
+ }
+
+diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php
+index b1d4da9514d6..9cd90451ea37 100644
+--- a/apps/user_ldap/lib/User_LDAP.php
++++ b/apps/user_ldap/lib/User_LDAP.php
+@@ -617,7 +617,7 @@ public function getLDAPAccess($uid) {
+ * The cloned connection needs to be closed manually.
+ * of the current access.
+ * @param string $uid
+- * @return resource of the LDAP connection
++ * @return resource|\LDAP\Connection The LDAP connection
+ */
+ public function getNewLDAPConnection($uid) {
+ $connection = clone $this->access->getConnection();
+diff --git a/apps/user_ldap/lib/User_Proxy.php b/apps/user_ldap/lib/User_Proxy.php
+index 5731f314aede..183c90493cfa 100644
+--- a/apps/user_ldap/lib/User_Proxy.php
++++ b/apps/user_ldap/lib/User_Proxy.php
+@@ -368,7 +368,7 @@ public function getLDAPAccess($uid) {
+ * The connection needs to be closed manually.
+ *
+ * @param string $uid
+- * @return resource of the LDAP connection
++ * @return resource|\LDAP\Connection The LDAP connection
+ */
+ public function getNewLDAPConnection($uid) {
+ return $this->handleRequest($uid, 'getNewLDAPConnection', [$uid]);
+diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php
+index 9b037b471347..98d399b77b94 100644
+--- a/apps/user_ldap/lib/Wizard.php
++++ b/apps/user_ldap/lib/Wizard.php
+@@ -820,7 +820,7 @@ private function detectGroupMemberAssoc() {
+ return false;
+ }
+ $er = $this->ldap->firstEntry($cr, $rr);
+- while (is_resource($er)) {
++ while ($this->ldap->isResource($er)) {
+ $this->ldap->getDN($cr, $er);
+ $attrs = $this->ldap->getAttributes($cr, $er);
+ $result = [];
+@@ -1066,7 +1066,7 @@ private function connectAndBind($port, $tls) {
+ ['app' => 'user_ldap']
+ );
+ $cr = $this->ldap->connect($host, $port);
+- if (!is_resource($cr)) {
++ if (!$this->ldap->isResource($cr)) {
+ throw new \Exception(self::$l->t('Invalid Host'));
+ }
+
+@@ -1276,7 +1276,7 @@ private function determineFeature($objectclasses, $attr, $dbkey, $confkey, $po =
+
+ /**
+ * appends a list of values fr
+- * @param resource $result the return value from ldap_get_attributes
++ * @param array $result the return value from ldap_get_attributes
+ * @param string $attribute the attribute values to look for
+ * @param array &$known new values will be appended here
+ * @return int, state on of the class constants LRESULT_PROCESSED_OK,
+
+From 743267eba4bf0558337dcb47f0f8c382f2b25b69 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet at nextcloud.com>
+Date: Mon, 29 Nov 2021 11:42:27 +0100
+Subject: [PATCH 07/12] Fix LDAP related docblocks types
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Côme Chilliet <come.chilliet at nextcloud.com>
+---
+ apps/user_ldap/lib/ILDAPWrapper.php | 2 +-
+ lib/public/LDAP/ILDAPProvider.php | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/apps/user_ldap/lib/ILDAPWrapper.php b/apps/user_ldap/lib/ILDAPWrapper.php
+index 9917898a001b..3f600a40cc0e 100644
+--- a/apps/user_ldap/lib/ILDAPWrapper.php
++++ b/apps/user_ldap/lib/ILDAPWrapper.php
+@@ -147,7 +147,7 @@ public function nextEntry($link, $result);
+ /**
+ * Read an entry
+ * @param resource|\LDAP\Connection $link LDAP link resource
+- * @param array $baseDN The DN of the entry to read from
++ * @param string $baseDN The DN of the entry to read from
+ * @param string $filter An LDAP filter
+ * @param array $attr array of the attributes to read
+ * @return resource|\LDAP\Result an LDAP search result resource
+diff --git a/lib/public/LDAP/ILDAPProvider.php b/lib/public/LDAP/ILDAPProvider.php
+index 0355a0052c41..8fad3bd2266e 100644
+--- a/lib/public/LDAP/ILDAPProvider.php
++++ b/lib/public/LDAP/ILDAPProvider.php
+@@ -79,7 +79,7 @@ public function sanitizeDN($dn);
+ /**
+ * Return a new LDAP connection resource for the specified user.
+ * @param string $uid user id
+- * @return resource of the LDAP connection
++ * @return \LDAP\Connection|resource
+ * @since 11.0.0
+ */
+ public function getLDAPConnection($uid);
+@@ -87,7 +87,7 @@ public function getLDAPConnection($uid);
+ /**
+ * Return a new LDAP connection resource for the specified group.
+ * @param string $gid group id
+- * @return resource of the LDAP connection
++ * @return \LDAP\Connection|resource
+ * @since 13.0.0
+ */
+ public function getGroupLDAPConnection($gid);
+
+From 72baee96988bbd9d3f7d68a90bf716008946000f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet at nextcloud.com>
+Date: Thu, 2 Dec 2021 16:31:19 +0100
+Subject: [PATCH 09/12] Allow minor release of PHP 8.1 to be used as well
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+No reason to allow 8.1.0 and not 8.1.1.
+
+Signed-off-by: Côme Chilliet <come.chilliet at nextcloud.com>
+---
+ lib/versioncheck.php | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/versioncheck.php b/lib/versioncheck.php
+index 8aa68dd35fdd..3e840ff5b461 100644
+--- a/lib/versioncheck.php
++++ b/lib/versioncheck.php
+@@ -33,10 +33,10 @@
+ exit(1);
+ }
+
+-// Show warning if > PHP 8.1 is used as Nextcloud is not compatible with > PHP 8.1 for now
+-if (PHP_VERSION_ID > 80100) {
++// 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.1.<br/>';
++ echo 'This version of Nextcloud is not compatible with PHP>=8.2.<br/>';
+ echo 'You are currently running ' . PHP_VERSION . '.';
+ exit(1);
+ }
+
+From c3a1a66eaefac9e06385d125dd4edae3117cc9eb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet at nextcloud.com>
+Date: Thu, 16 Dec 2021 10:35:03 +0100
+Subject: [PATCH 12/12] Avoid deprecation warnings about
+ libxml_disable_entity_loader in PHP 8.1
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Côme Chilliet <come.chilliet at nextcloud.com>
+---
+ lib/private/Updater/ChangesCheck.php | 10 +++++++---
+ lib/private/Updater/VersionCheck.php | 10 +++++++---
+ 2 files changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/lib/private/Updater/ChangesCheck.php b/lib/private/Updater/ChangesCheck.php
+index 600c8db9a3c2..e3ced6e5b123 100644
+--- a/lib/private/Updater/ChangesCheck.php
++++ b/lib/private/Updater/ChangesCheck.php
+@@ -138,9 +138,13 @@ protected function queryChangesServer(string $uri, ChangesResult $entry): IRespo
+ protected function extractData($body):array {
+ $data = [];
+ if ($body) {
+- $loadEntities = libxml_disable_entity_loader(true);
+- $xml = @simplexml_load_string($body);
+- libxml_disable_entity_loader($loadEntities);
++ if (\LIBXML_VERSION < 20900) {
++ $loadEntities = libxml_disable_entity_loader(true);
++ $xml = @simplexml_load_string($body);
++ libxml_disable_entity_loader($loadEntities);
++ } else {
++ $xml = @simplexml_load_string($body);
++ }
+ if ($xml !== false) {
+ $data['changelogURL'] = (string)$xml->changelog['href'];
+ $data['whatsNew'] = [];
+diff --git a/lib/private/Updater/VersionCheck.php b/lib/private/Updater/VersionCheck.php
+index ffa707d89909..d9f795796b8c 100644
+--- a/lib/private/Updater/VersionCheck.php
++++ b/lib/private/Updater/VersionCheck.php
+@@ -95,9 +95,13 @@ public function check() {
+ }
+
+ if ($xml) {
+- $loadEntities = libxml_disable_entity_loader(true);
+- $data = @simplexml_load_string($xml);
+- libxml_disable_entity_loader($loadEntities);
++ if (\LIBXML_VERSION < 20900) {
++ $loadEntities = libxml_disable_entity_loader(true);
++ $data = @simplexml_load_string($xml);
++ libxml_disable_entity_loader($loadEntities);
++ } else {
++ $data = @simplexml_load_string($xml);
++ }
+ if ($data !== false) {
+ $tmp['version'] = (string)$data->version;
+ $tmp['versionstring'] = (string)$data->versionstring;
Copied: nextcloud/repos/community-testing-any/nextcloud-23.0.0-pimple_php8.1.patch (from rev 1133412, nextcloud/trunk/nextcloud-23.0.0-pimple_php8.1.patch)
===================================================================
--- community-testing-any/nextcloud-23.0.0-pimple_php8.1.patch (rev 0)
+++ community-testing-any/nextcloud-23.0.0-pimple_php8.1.patch 2022-02-15 23:24:59 UTC (rev 1133413)
@@ -0,0 +1,130 @@
+diff --git a/pimple/pimple/src/Pimple/Container.php b/pimple/pimple/src/Pimple/Container.php
+index 715de10e..586a0b77 100644
+--- a/pimple/pimple/src/Pimple/Container.php
++++ b/pimple/pimple/src/Pimple/Container.php
+@@ -74,8 +74,11 @@ public function __construct(array $values = [])
+ * @param string $id The unique identifier for the parameter or object
+ * @param mixed $value The value of the parameter or a closure to define an object
+ *
++ * @return void
++ *
+ * @throws FrozenServiceException Prevent override of a frozen service
+ */
++ #[\ReturnTypeWillChange]
+ public function offsetSet($id, $value)
+ {
+ if (isset($this->frozen[$id])) {
+@@ -95,6 +98,7 @@ public function offsetSet($id, $value)
+ *
+ * @throws UnknownIdentifierException If the identifier is not defined
+ */
++ #[\ReturnTypeWillChange]
+ public function offsetGet($id)
+ {
+ if (!isset($this->keys[$id])) {
+@@ -130,6 +134,7 @@ public function offsetGet($id)
+ *
+ * @return bool
+ */
++ #[\ReturnTypeWillChange]
+ public function offsetExists($id)
+ {
+ return isset($this->keys[$id]);
+@@ -139,7 +144,10 @@ public function offsetExists($id)
+ * Unsets a parameter or an object.
+ *
+ * @param string $id The unique identifier for the parameter or object
++ *
++ * @return void
+ */
++ #[\ReturnTypeWillChange]
+ public function offsetUnset($id)
+ {
+ if (isset($this->keys[$id])) {
+@@ -280,8 +288,7 @@ public function keys()
+ /**
+ * Registers a service provider.
+ *
+- * @param ServiceProviderInterface $provider A ServiceProviderInterface instance
+- * @param array $values An array of values that customizes the provider
++ * @param array $values An array of values that customizes the provider
+ *
+ * @return static
+ */
+diff --git a/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php b/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php
+index c173d7c0..714b8826 100644
+--- a/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php
++++ b/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php
+@@ -68,7 +68,7 @@ public function get(string $id)
+ /**
+ * {@inheritdoc}
+ */
+- public function has(string $id)
++ public function has(string $id): bool
+ {
+ return isset($this->aliases[$id]) && isset($this->container[$this->aliases[$id]]);
+ }
+diff --git a/pimple/pimple/src/Pimple/ServiceIterator.php b/pimple/pimple/src/Pimple/ServiceIterator.php
+index 5cde5188..ebafac16 100644
+--- a/pimple/pimple/src/Pimple/ServiceIterator.php
++++ b/pimple/pimple/src/Pimple/ServiceIterator.php
+@@ -42,26 +42,46 @@ public function __construct(Container $container, array $ids)
+ $this->ids = $ids;
+ }
+
++ /**
++ * @return void
++ */
++ #[\ReturnTypeWillChange]
+ public function rewind()
+ {
+ \reset($this->ids);
+ }
+
++ /**
++ * @return mixed
++ */
++ #[\ReturnTypeWillChange]
+ public function current()
+ {
+ return $this->container[\current($this->ids)];
+ }
+
++ /**
++ * @return mixed
++ */
++ #[\ReturnTypeWillChange]
+ public function key()
+ {
+ return \current($this->ids);
+ }
+
++ /**
++ * @return void
++ */
++ #[\ReturnTypeWillChange]
+ public function next()
+ {
+ \next($this->ids);
+ }
+
++ /**
++ * @return bool
++ */
++ #[\ReturnTypeWillChange]
+ public function valid()
+ {
+ return null !== \key($this->ids);
+diff --git a/pimple/pimple/src/Pimple/ServiceProviderInterface.php b/pimple/pimple/src/Pimple/ServiceProviderInterface.php
+index c004594b..abf90d82 100644
+--- a/pimple/pimple/src/Pimple/ServiceProviderInterface.php
++++ b/pimple/pimple/src/Pimple/ServiceProviderInterface.php
+@@ -39,8 +39,6 @@ interface ServiceProviderInterface
+ *
+ * This method should only be used to configure services and parameters.
+ * It should not get services.
+- *
+- * @param Container $pimple A container instance
+ */
+ public function register(Container $pimple);
+ }
Copied: nextcloud/repos/community-testing-any/nextcloud-cron.service (from rev 1133412, nextcloud/trunk/nextcloud-cron.service)
===================================================================
--- community-testing-any/nextcloud-cron.service (rev 0)
+++ community-testing-any/nextcloud-cron.service 2022-02-15 23:24:59 UTC (rev 1133413)
@@ -0,0 +1,9 @@
+[Unit]
+Description=Nextcloud; run cron.php
+
+[Service]
+User=nextcloud
+ExecStart=/usr/bin/php -f /usr/share/webapps/nextcloud/cron.php
+
+[Install]
+WantedBy=basic.target
Copied: nextcloud/repos/community-testing-any/nextcloud-cron.timer (from rev 1133412, nextcloud/trunk/nextcloud-cron.timer)
===================================================================
--- community-testing-any/nextcloud-cron.timer (rev 0)
+++ community-testing-any/nextcloud-cron.timer 2022-02-15 23:24:59 UTC (rev 1133413)
@@ -0,0 +1,9 @@
+[Unit]
+Description=Nextcloud; run cron.php periodically
+
+[Timer]
+OnBootSec=5min
+OnUnitActiveSec=5min
+
+[Install]
+WantedBy=timers.target
\ No newline at end of file
Copied: nextcloud/repos/community-testing-any/nextcloud.config.php (from rev 1133412, nextcloud/trunk/nextcloud.config.php)
===================================================================
--- community-testing-any/nextcloud.config.php (rev 0)
+++ community-testing-any/nextcloud.config.php 2022-02-15 23:24:59 UTC (rev 1133413)
@@ -0,0 +1,17 @@
+<?php
+$CONFIG = array (
+'datadirectory' => '/var/lib/nextcloud/data',
+'logfile' => '/var/log/nextcloud/nextcloud.log',
+'apps_paths' => [
+ [
+ 'path'=> '/usr/share/webapps/nextcloud/apps',
+ 'url' => '/apps',
+ 'writable' => false,
+ ],
+ [
+ 'path'=> '/var/lib/nextcloud/apps',
+ 'url' => '/wapps',
+ 'writable' => true,
+ ],
+],
+);
Copied: nextcloud/repos/community-testing-any/nextcloud.hook (from rev 1133412, nextcloud/trunk/nextcloud.hook)
===================================================================
--- community-testing-any/nextcloud.hook (rev 0)
+++ community-testing-any/nextcloud.hook 2022-02-15 23:24:59 UTC (rev 1133413)
@@ -0,0 +1,13 @@
+# Update Nextcloud when core or -apps are touched
+
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Type = Package
+Target = nextcloud
+Target = nextcloud-app-*
+
+[Action]
+Description = Updating Nextcloud installation
+When = PostTransaction
+Exec = /usr/bin/runuser -u nextcloud -- /usr/bin/php /usr/share/webapps/nextcloud/occ upgrade
Copied: nextcloud/repos/community-testing-any/nextcloud.install (from rev 1133412, nextcloud/trunk/nextcloud.install)
===================================================================
--- community-testing-any/nextcloud.install (rev 0)
+++ community-testing-any/nextcloud.install 2022-02-15 23:24:59 UTC (rev 1133413)
@@ -0,0 +1,16 @@
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ if (( "$(vercmp "$2" '21.0.0-6')" < 0 )); then
+ printf "WARNING: Major changes introduced to package!\n"
+ printf " The application is now run as its own user - nextcloud.\n"
+ printf " Default directories for runtime, state and log files are provided.\n"
+ printf " A convenience wrapper around occ is provided in /usr/bin/occ.\n"
+ # directories below /usr/share/webapps/nextcloud are still group-owned by the
+ # nextcloud user due to nextcloud < 21.0.0
+ find /usr/share/webapps/nextcloud -type d -exec chgrp root {} \;
+ fi
+ if (( "$(vercmp "$2" '22.0.0-1')" < 0 )); then
+ printf "NOTE: The application's .htaccess file is now located in /etc/webapps/nextcloud/.\n"
+ fi
+}
Copied: nextcloud/repos/community-testing-any/nextcloud.occ.sh (from rev 1133412, nextcloud/trunk/nextcloud.occ.sh)
===================================================================
--- community-testing-any/nextcloud.occ.sh (rev 0)
+++ community-testing-any/nextcloud.occ.sh 2022-02-15 23:24:59 UTC (rev 1133413)
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+
+readonly default_config="/etc/php/php.ini"
+readonly default_php_command="/usr/bin/php"
+readonly default_user="nextcloud"
+readonly preserved_environment_vars="NEXTCLOUD_CONFIG_DIR"
+
+config=""
+php_command=""
+user=""
+
+check_sudo() {
+ if ! command -v sudo > /dev/null; then
+ printf "The sudo command is not available.\n"
+ exit 1
+ fi
+}
+
+# allow overriding the php.ini
+if [[ -n "${NEXTCLOUD_PHP_CONFIG}" ]] && [[ -f "${NEXTCLOUD_PHP_CONFIG}" ]]; then
+ config="${NEXTCLOUD_PHP_CONFIG}"
+else
+ config="${default_config}"
+fi
+
+# allow overriding the php executable
+if [[ -n "${NEXTCLOUD_PHP}" ]] && command -v "${NEXTCLOUD_PHP}" > /dev/null; then
+ php_command="${NEXTCLOUD_PHP}"
+else
+ php_command="${default_php_command}"
+fi
+
+# allow overriding the user to run as
+if [[ -n "${NEXTCLOUD_USER}" ]] && id "${NEXTCLOUD_USER}" > /dev/null 2>&1; then
+ user="${NEXTCLOUD_USER}"
+else
+ user="${default_user}"
+fi
+
+if [[ "${UID}" -eq 0 ]]; then
+ runuser --whitelist-environment="${preserved_environment_vars}" -u "$user" -- "$php_command" -c "${config}" /usr/share/webapps/nextcloud/occ "$@"
+else
+ check_sudo
+ sudo --preserve-env="${preserved_environment_vars}" -u "$user" "$php_command" -c "${config}" /usr/share/webapps/nextcloud/occ "$@"
+fi
Copied: nextcloud/repos/community-testing-any/nextcloud.sysusers (from rev 1133412, nextcloud/trunk/nextcloud.sysusers)
===================================================================
--- community-testing-any/nextcloud.sysusers (rev 0)
+++ community-testing-any/nextcloud.sysusers 2022-02-15 23:24:59 UTC (rev 1133413)
@@ -0,0 +1 @@
+u nextcloud - "Nextcloud user" - -
Copied: nextcloud/repos/community-testing-any/nextcloud.tmpfiles (from rev 1133412, nextcloud/trunk/nextcloud.tmpfiles)
===================================================================
--- community-testing-any/nextcloud.tmpfiles (rev 0)
+++ community-testing-any/nextcloud.tmpfiles 2022-02-15 23:24:59 UTC (rev 1133413)
@@ -0,0 +1,9 @@
+Z /etc/webapps/nextcloud/config - nextcloud nextcloud
+z /etc/webapps/nextcloud/.htaccess 0644 nextcloud nextcloud
+z /etc/webapps/nextcloud/ 0755 root root
+Z %C/nextcloud - nextcloud nextcloud
+d %t/nextcloud 0755 nextcloud nextcloud
+z %L/nextcloud 0755 nextcloud nextcloud
+d %S/nextcloud 0755 nextcloud nextcloud
+d %S/nextcloud/apps 0755 nextcloud nextcloud
+d %S/nextcloud/data 0770 nextcloud nextcloud
Copied: nextcloud/repos/community-testing-any/nextcloud.uwsgi (from rev 1133412, nextcloud/trunk/nextcloud.uwsgi)
===================================================================
--- community-testing-any/nextcloud.uwsgi (rev 0)
+++ community-testing-any/nextcloud.uwsgi 2022-02-15 23:24:59 UTC (rev 1133413)
@@ -0,0 +1,82 @@
+[uwsgi]
+procname-master = %n
+plugins = php
+master = true
+socket = /run/%n/%n.sock
+# uncomment for a stats socket, that can be used with uwsgitop
+# stats = /run/%n/%n-stats.sock
+uid = nextcloud
+gid = nextcloud
+processes = 10
+cheaper = 4
+cheaper-step = 1
+idle = 600
+die-on-idle = true
+
+; reload whenever this config file changes
+touch-reload = %p
+
+cloud_data_dir = /var/lib/nextcloud/data
+cloud_writable_apps_dir = /var/lib/nextcloud/apps
+chdir = %(cloud_data_dir)
+
+php-allowed-ext = .php
+php-docroot = /usr/share/webapps/%n
+php-index = index.php
+php-set = date.timezone=Europe/Berlin
+php-set = open_basedir=%(cloud_data_dir):%(cloud_writable_apps_dir):/var/lib/%n:/tmp/:/usr/share/webapps/%n:/etc/webapps/%n:/dev/urandom:/usr/lib/php/modules:/run/redis/redis.sock:/var/log/%n/%n.log:/proc/meminfo
+php-set = session.save_path=/tmp
+php-set = session.gc_maxlifetime 21600
+php-set = session.gc_divisor 500
+php-set = session.gc_probability 1
+php-set = post_max_size=1000M
+php-set = upload_max_filesize=1000M
+php-set = always_populate_raw_post_data=-1
+php-set = max_input_time=120
+php-set = max_execution_time=60
+php-set = memory_limit=768M
+php-set = zend_extension=opcache
+php-set = opcache.enable=1
+php-set = opcache.enable_cli=1
+php-set = opcache.interned_strings_buffer=8
+php-set = opcache.max_accelerated_files=10000
+php-set = opcache.memory_consumption=128
+php-set = opcache.save_comments=1
+php-set = opcache.revalidate_freq=1
+
+# uncomment if php-apcu is installed and used
+# php-set = extension=apcu
+php-set = extension=bcmath
+php-set = extension=bz2
+php-set = extension=curl
+php-set = extension=exif
+php-set = extension=ftp
+php-set = extension=gd
+php-set = extension=gmp
+# uncomment if php-imagick is installed and used
+# php-set = extension=imagick
+# uncomment if php-imap is installed and used
+# php-set = extension=imap
+# uncomment if php-intl is installed and used
+# php-set = extension=intl
+php-set = extension=iconv
+php-set = extension=ldap
+# uncomment if php-memcached is installed and used
+# php-set = extension=memcached
+php-set = extension=pdo_mysql
+# uncomment if php-pgsql is installed and used
+# php-set = extension=pdo_pgsql
+php-set = extension=pdo_sqlite
+# uncomment if php-igbinary is installed and used
+# php-set = extension=igbinary
+# uncomment if php-redis is installed and used (requires php-igbinary)
+# php-set = extension=redis
+php-set = extension=sockets
+# uncomment if php-xsl is installed and used
+# php-set = extension=xsl
+php-set = extension=zip
+
+# change the URL to your own address and uncomment to run a webcron job every five minutes
+# cron = -5 -1 -1 -1 -1 curl --silent https://change.me.tld/cron.php 1>/dev/null
+# uncomment to run a cron job every five minutes
+# cron = -5 -1 -1 -1 -1 php -f /usr/share/webapps/%n/cron.php
More information about the arch-commits
mailing list