aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/phpunit-32bits.yml58
-rw-r--r--.github/workflows/smb-kerberos.yml32
-rw-r--r--apps/dav/l10n/bg.js3
-rw-r--r--apps/dav/l10n/bg.json3
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php26
-rw-r--r--apps/dav/lib/Connector/Sabre/File.php5
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php6
-rw-r--r--apps/dav/lib/Connector/Sabre/Node.php28
-rw-r--r--apps/dav/lib/Connector/Sabre/QuotaPlugin.php2
-rw-r--r--apps/dav/lib/Direct/DirectFile.php4
-rw-r--r--apps/dav/lib/Upload/UploadFile.php5
-rw-r--r--apps/dav/tests/unit/CalDAV/CalDavBackendTest.php21
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php4
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php2
-rw-r--r--apps/files/appinfo/routes.php4
-rw-r--r--apps/files/tests/HelperTest.php5
-rw-r--r--apps/files_external/lib/Lib/Storage/FTP.php2
-rwxr-xr-xapps/files_external/tests/client-cmd.sh6
-rwxr-xr-xapps/files_external/tests/setup-krb.sh33
-rwxr-xr-xapps/files_external/tests/start-apache.sh11
-rwxr-xr-xapps/files_external/tests/start-dc.sh29
-rw-r--r--apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php2
-rw-r--r--apps/files_sharing/tests/ApiTest.php19
-rw-r--r--apps/files_trashbin/lib/Sabre/AbstractTrash.php6
-rw-r--r--apps/files_trashbin/lib/Sabre/ITrash.php2
-rw-r--r--apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php3
-rw-r--r--apps/files_versions/lib/Db/VersionEntity.php6
-rw-r--r--apps/files_versions/lib/Sabre/VersionFile.php6
-rw-r--r--apps/files_versions/lib/Versions/IVersion.php4
-rw-r--r--apps/files_versions/lib/Versions/Version.php6
-rw-r--r--apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php3
-rw-r--r--apps/provisioning_api/tests/Controller/UsersControllerTest.php3
-rw-r--r--apps/theming/l10n/bg.js2
-rw-r--r--apps/theming/l10n/bg.json2
-rw-r--r--build/psalm-baseline.xml54
-rw-r--r--core/Command/Log/File.php4
-rw-r--r--core/js/login/authpicker.js2
-rw-r--r--core/l10n/sq.js215
-rw-r--r--core/l10n/sq.json213
-rw-r--r--core/templates/loginflow/authpicker.php2
-rw-r--r--core/templates/loginflowv2/authpicker.php2
-rw-r--r--lib/composer/composer/autoload_classmap.php1
-rw-r--r--lib/composer/composer/autoload_static.php1
-rw-r--r--lib/l10n/eu.js39
-rw-r--r--lib/l10n/eu.json39
-rw-r--r--lib/private/AppFramework/Utility/QueryNotFoundException.php41
-rw-r--r--lib/private/AppFramework/Utility/SimpleContainer.php5
-rw-r--r--lib/private/Archive/Archive.php3
-rw-r--r--lib/private/Archive/TAR.php4
-rw-r--r--lib/private/Archive/ZIP.php3
-rw-r--r--lib/private/Files/FileInfo.php7
-rw-r--r--lib/private/Files/Filesystem.php2
-rw-r--r--lib/private/Files/Node/LazyFolder.php2
-rw-r--r--lib/private/Files/Node/Node.php4
-rw-r--r--lib/private/Files/Node/NonExistingFile.php2
-rw-r--r--lib/private/Files/Node/NonExistingFolder.php2
-rw-r--r--lib/private/Files/Node/Root.php4
-rw-r--r--lib/private/Files/SimpleFS/NewSimpleFile.php2
-rw-r--r--lib/private/Files/SimpleFS/SimpleFile.php2
-rw-r--r--lib/private/Files/Storage/Common.php6
-rw-r--r--lib/private/Files/Storage/FailedStorage.php2
-rw-r--r--lib/private/Files/Storage/Local.php15
-rw-r--r--lib/private/Files/Storage/Wrapper/Availability.php5
-rw-r--r--lib/private/Files/Storage/Wrapper/Encoding.php5
-rw-r--r--lib/private/Files/Storage/Wrapper/Encryption.php5
-rw-r--r--lib/private/Files/Storage/Wrapper/Jail.php5
-rw-r--r--lib/private/Files/Storage/Wrapper/Wrapper.php5
-rw-r--r--lib/private/Files/Stream/Encryption.php6
-rw-r--r--lib/private/Files/View.php5
-rwxr-xr-xlib/private/LargeFileHelper.php21
-rw-r--r--lib/private/Lockdown/Filesystem/NullStorage.php2
-rw-r--r--lib/private/MemoryInfo.php21
-rw-r--r--lib/private/Setup.php7
-rw-r--r--lib/private/Streamer.php14
-rw-r--r--lib/private/Updater.php3
-rw-r--r--lib/private/User/User.php8
-rw-r--r--lib/private/legacy/OC_Files.php15
-rw-r--r--lib/private/legacy/OC_Helper.php31
-rw-r--r--lib/private/legacy/OC_Response.php13
-rw-r--r--lib/private/legacy/OC_Util.php4
-rw-r--r--lib/public/AppFramework/QueryException.php2
-rw-r--r--lib/public/Files/FileInfo.php2
-rw-r--r--lib/public/Files/Node.php2
-rw-r--r--lib/public/Files/SimpleFS/ISimpleFile.php2
-rw-r--r--lib/public/Files/SimpleFS/InMemoryFile.php2
-rw-r--r--lib/public/Files/Storage.php2
-rw-r--r--lib/public/Files/Storage/IStorage.php2
-rw-r--r--lib/public/IContainer.php2
-rw-r--r--lib/public/Util.php33
-rw-r--r--tests/lib/AppFramework/Utility/SimpleContainerTest.php27
-rw-r--r--tests/lib/Files/ViewTest.php20
-rw-r--r--tests/lib/Memcache/APCuTest.php4
-rw-r--r--tests/lib/Memcache/ArrayCacheTest.php3
-rw-r--r--tests/lib/Memcache/CasTraitTest.php3
-rw-r--r--tests/lib/Memcache/FactoryTest.php3
-rw-r--r--tests/lib/Memcache/MemcachedTest.php4
-rw-r--r--tests/lib/Memcache/RedisTest.php4
-rw-r--r--tests/lib/MemoryInfoTest.php4
-rw-r--r--tests/lib/Route/RouterTest.php8
99 files changed, 551 insertions, 784 deletions
diff --git a/.github/workflows/phpunit-32bits.yml b/.github/workflows/phpunit-32bits.yml
new file mode 100644
index 00000000000..1f91281bf16
--- /dev/null
+++ b/.github/workflows/phpunit-32bits.yml
@@ -0,0 +1,58 @@
+name: PHPUnit
+
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: "15 1 * * 1-6"
+
+permissions:
+ contents: read
+
+concurrency:
+ group: phpunit-32bits-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
+jobs:
+ phpunit-32bits:
+ runs-on: ubuntu-latest
+ container: shivammathur/node:latest-i386
+
+ strategy:
+ matrix:
+ php-versions: ['8.0']
+
+ steps:
+ - name: Checkout server
+ uses: actions/checkout@v3
+ with:
+ submodules: true
+
+ - name: Install tools
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y ffmpeg imagemagick libmagickcore-6.q16-3-extra
+
+ - name: Set up php ${{ matrix.php-versions }}
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-versions }}
+ extensions: ctype, curl, dom, fileinfo, gd, imagick, intl, json, mbstring, openssl, pdo_sqlite, posix, sqlite, xml, zip, apcu
+ tools: phpunit:9
+ coverage: none
+ ini-values:
+ apc.enabled=on,
+ apc.enable_cli=on
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Set up Nextcloud
+ env:
+ DB_PORT: 4444
+ run: |
+ mkdir data
+ ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=rootpassword --admin-user admin --admin-pass admin
+ php -f index.php
+
+ - name: PHPUnit
+ working-directory: tests
+ run: phpunit --configuration phpunit-autotest.xml --exclude-group PRIMARY-azure,PRIMARY-s3,PRIMARY-swift,Memcached,Redis,RoutingWeirdness
diff --git a/.github/workflows/smb-kerberos.yml b/.github/workflows/smb-kerberos.yml
index f47a06fbed7..1cb8ae973ca 100644
--- a/.github/workflows/smb-kerberos.yml
+++ b/.github/workflows/smb-kerberos.yml
@@ -6,15 +6,17 @@ on:
- stable*
paths:
- 'apps/files_external/**'
+ - '.github/workflows/smb-kerberos.yml'
pull_request:
paths:
- 'apps/files_external/**'
+ - '.github/workflows/smb-kerberos.yml'
jobs:
smb-kerberos-tests:
runs-on: ubuntu-latest
- name: kerberos
+ name: smb-kerberos-sso
steps:
- name: Checkout server
@@ -28,9 +30,12 @@ jobs:
docker pull icewind1991/samba-krb-test-client
- name: Setup AD-DC
run: |
+ cp apps/files_external/tests/*.sh .
mkdir data
sudo chown -R 33 data apps config
- apps/files_external/tests/setup-krb.sh
+ DC_IP=$(./start-dc.sh)
+ ./start-apache.sh $DC_IP $PWD
+ echo "DC_IP=$DC_IP" >> $GITHUB_ENV
- name: Set up Nextcloud
run: |
docker exec --user 33 apache ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
@@ -39,7 +44,8 @@ jobs:
# setup user_saml
docker exec --user 33 apache ./occ app:enable user_saml --force
docker exec --user 33 apache ./occ config:app:set user_saml type --value 'environment-variable'
- docker exec --user 33 apache ./occ config:app:set user_saml general-uid_mapping --value REMOTE_USER
+ docker exec --user 33 apache ./occ saml:config:create
+ docker exec --user 33 apache ./occ saml:config:set 1 --general-uid_mapping=REMOTE_USER
# setup external storage
docker exec --user 33 apache ./occ app:enable files_external --force
@@ -49,16 +55,18 @@ jobs:
docker exec --user 33 apache ./occ files_external:list
- name: Test SSO
run: |
- mkdir cookies
- chmod 0777 cookies
+ mkdir /tmp/shared/cookies
+ chmod 0777 /tmp/shared/cookies
- DC_IP=$(docker inspect dc --format '{{.NetworkSettings.IPAddress}}')
echo "SAML login"
- docker run --rm --name client -v $PWD/cookies:/cookies -v /tmp/shared:/shared --dns $DC_IP --hostname client.domain.test icewind1991/samba-krb-test-client \
- curl -c /cookies/jar --negotiate -u testuser@DOMAIN.TEST: --delegation always http://httpd.domain.test/index.php/apps/user_saml/saml/login
+ ./client-cmd.sh ${{ env.DC_IP }} curl -c /shared/cookies/jar -s --negotiate -u testuser@DOMAIN.TEST: --delegation always http://httpd.domain.test/index.php/apps/user_saml/saml/login
echo "Check we are logged in"
- CONTENT=$(docker run --rm --name client -v $PWD/cookies:/cookies -v /tmp/shared:/shared --dns $DC_IP --hostname client.domain.test icewind1991/samba-krb-test-client \
- curl -b /cookies/jar -s --negotiate -u testuser@DOMAIN.TEST: --delegation always http://httpd.domain.test/remote.php/webdav/smb/test.txt)
- echo $CONTENT
- CONTENT=$(echo $CONTENT | tr -d '[:space:]')
+ CONTENT=$(./client-cmd.sh ${{ env.DC_IP }} curl -b /shared/cookies/jar -s --negotiate -u testuser@DOMAIN.TEST: --delegation always http://httpd.domain.test/remote.php/webdav/smb/test.txt)
+ CONTENT=$(echo $CONTENT | head -n 1 | tr -d '[:space:]')
[[ $CONTENT == "testfile" ]]
+ - name: Show logs
+ if: failure()
+ run: |
+ docker exec --user 33 apache ./occ log:file
+ FILEPATH=$(docker exec --user 33 apache ./occ log:file | grep "Log file:" | cut -d' ' -f3)
+ docker exec --user 33 apache cat $FILEPATH
diff --git a/apps/dav/l10n/bg.js b/apps/dav/l10n/bg.js
index e7dd55155f0..85fba41fc61 100644
--- a/apps/dav/l10n/bg.js
+++ b/apps/dav/l10n/bg.js
@@ -72,8 +72,11 @@ OC.L10N.register(
"Where: %s" : "Къде: %s",
"%1$s via %2$s" : "%1$s чрез %2$s",
"Cancelled: %1$s" : "Отказан: %1$s",
+ "\"%1$s\" has been canceled" : "„%1$s“ е отказано",
"Re: %1$s" : "Re: %1$s",
+ "%1$s has responded your invitation" : "%1$s отговори на вашата покана",
"Invitation: %1$s" : "Покана: %1$s",
+ "%1$s would like to invite you to \"%2$s\"" : "%1$s желае да ви покани на „%2$s“",
"Organizer:" : "Organizer/организатор/:",
"Attendees:" : "Участници:",
"Title:" : "Заглавие:",
diff --git a/apps/dav/l10n/bg.json b/apps/dav/l10n/bg.json
index fc6d709a5b0..7fe1597b807 100644
--- a/apps/dav/l10n/bg.json
+++ b/apps/dav/l10n/bg.json
@@ -70,8 +70,11 @@
"Where: %s" : "Къде: %s",
"%1$s via %2$s" : "%1$s чрез %2$s",
"Cancelled: %1$s" : "Отказан: %1$s",
+ "\"%1$s\" has been canceled" : "„%1$s“ е отказано",
"Re: %1$s" : "Re: %1$s",
+ "%1$s has responded your invitation" : "%1$s отговори на вашата покана",
"Invitation: %1$s" : "Покана: %1$s",
+ "%1$s would like to invite you to \"%2$s\"" : "%1$s желае да ви покани на „%2$s“",
"Organizer:" : "Organizer/организатор/:",
"Attendees:" : "Участници:",
"Title:" : "Заглавие:",
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index 909a5828059..51eb505124e 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -72,7 +72,6 @@ use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\IGroupManager;
-use OCP\IUser;
use OCP\IUserManager;
use OCP\Security\ISecureRandom;
use Psr\Log\LoggerInterface;
@@ -120,7 +119,6 @@ use function time;
* @package OCA\DAV\CalDAV
*/
class CalDavBackend extends AbstractBackend implements SyncSupport, SubscriptionSupport, SchedulingSupport {
-
use TTransactional;
public const CALENDAR_TYPE_CALENDAR = 0;
@@ -346,7 +344,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$row['principaluri'] = (string) $row['principaluri'];
$components = [];
if ($row['components']) {
- $components = explode(',',$row['components']);
+ $components = explode(',', $row['components']);
}
$calendar = [
@@ -420,7 +418,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$row['displayname'] = $row['displayname'] . ' (' . ($this->userManager->getDisplayName($name) ?? ($name ?? '')) . ')';
$components = [];
if ($row['components']) {
- $components = explode(',',$row['components']);
+ $components = explode(',', $row['components']);
}
$calendar = [
'id' => $row['id'],
@@ -469,7 +467,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$row['principaluri'] = (string) $row['principaluri'];
$components = [];
if ($row['components']) {
- $components = explode(',',$row['components']);
+ $components = explode(',', $row['components']);
}
$calendar = [
'id' => $row['id'],
@@ -521,7 +519,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$row['displayname'] = $row['displayname'] . "($name)";
$components = [];
if ($row['components']) {
- $components = explode(',',$row['components']);
+ $components = explode(',', $row['components']);
}
$calendar = [
'id' => $row['id'],
@@ -586,7 +584,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$row['displayname'] = $row['displayname'] . ' ' . "($name)";
$components = [];
if ($row['components']) {
- $components = explode(',',$row['components']);
+ $components = explode(',', $row['components']);
}
$calendar = [
'id' => $row['id'],
@@ -639,7 +637,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$row['principaluri'] = (string) $row['principaluri'];
$components = [];
if ($row['components']) {
- $components = explode(',',$row['components']);
+ $components = explode(',', $row['components']);
}
$calendar = [
@@ -687,7 +685,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$row['principaluri'] = (string) $row['principaluri'];
$components = [];
if ($row['components']) {
- $components = explode(',',$row['components']);
+ $components = explode(',', $row['components']);
}
$calendar = [
@@ -779,7 +777,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
if (!($properties[$sccs] instanceof SupportedCalendarComponentSet)) {
throw new DAV\Exception('The ' . $sccs . ' property must be of type: \Sabre\CalDAV\Property\SupportedCalendarComponentSet');
}
- $values['components'] = implode(',',$properties[$sccs]->getValue());
+ $values['components'] = implode(',', $properties[$sccs]->getValue());
} elseif (isset($properties['components'])) {
// Allow to provide components internally without having
// to create a SupportedCalendarComponentSet object
@@ -797,7 +795,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
}
}
- [$calendarId, $calendarData] = $this->atomic(function() use ($values) {
+ [$calendarId, $calendarData] = $this->atomic(function () use ($values) {
$query = $this->db->getQueryBuilder();
$query->insert('calendars');
foreach ($values as $column => $value) {
@@ -1712,7 +1710,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$query->expr()->eq('c.calendarid',
$query->createNamedParameter($id)),
$query->expr()->eq('c.calendartype',
- $query->createNamedParameter(self::CALENDAR_TYPE_CALENDAR)));
+ $query->createNamedParameter(self::CALENDAR_TYPE_CALENDAR)));
}
foreach ($sharedCalendars as $id) {
$calendarExpressions[] = $query->expr()->andX(
@@ -1860,7 +1858,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
}
}
- if(isset($options['uid'])) {
+ if (isset($options['uid'])) {
$outerQuery->andWhere($outerQuery->expr()->eq('uid', $outerQuery->createNamedParameter($options['uid'])));
}
@@ -2435,7 +2433,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
}
}
- [$subscriptionId, $subscriptionRow] = $this->atomic(function() use ($values) {
+ [$subscriptionId, $subscriptionRow] = $this->atomic(function () use ($values) {
$valuesToInsert = [];
$query = $this->db->getQueryBuilder();
foreach (array_keys($values) as $name) {
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php
index fd8a6437222..b0f17417d21 100644
--- a/apps/dav/lib/Connector/Sabre/File.php
+++ b/apps/dav/lib/Connector/Sabre/File.php
@@ -138,7 +138,7 @@ class File extends Node implements IFile {
public function put($data) {
try {
$exists = $this->fileView->file_exists($this->path);
- if ($this->info && $exists && !$this->info->isUpdateable()) {
+ if ($exists && !$this->info->isUpdateable()) {
throw new Forbidden();
}
} catch (StorageNotAvailableException $e) {
@@ -759,9 +759,6 @@ class File extends Node implements IFile {
* @return string|null
*/
public function getChecksum() {
- if (!$this->info) {
- return null;
- }
return $this->info->getChecksum();
}
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
index f53c62afba2..a6c9b8b4ebe 100644
--- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
@@ -53,10 +53,8 @@ use Sabre\DAV\Server;
use Sabre\DAV\Tree;
use Sabre\HTTP\RequestInterface;
use Sabre\HTTP\ResponseInterface;
-use Sabre\Uri;
class FilesPlugin extends ServerPlugin {
-
// namespace
public const NS_OWNCLOUD = 'http://owncloud.org/ns';
public const NS_NEXTCLOUD = 'http://nextcloud.org/ns';
@@ -352,7 +350,7 @@ class FilesPlugin extends ServerPlugin {
$propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) {
return json_encode($this->previewManager->isAvailable($node->getFileInfo()), JSON_THROW_ON_ERROR);
});
- $propFind->handle(self::SIZE_PROPERTYNAME, function () use ($node): ?int {
+ $propFind->handle(self::SIZE_PROPERTYNAME, function () use ($node): int|float {
return $node->getSize();
});
$propFind->handle(self::MOUNT_TYPE_PROPERTYNAME, function () use ($node) {
@@ -382,7 +380,7 @@ class FilesPlugin extends ServerPlugin {
});
/**
* Return file/folder name as displayname. The primary reason to
- * implement it this way is to avoid costly fallback to
+ * implement it this way is to avoid costly fallback to
* CustomPropertiesBackend (esp. visible when querying all files
* in a folder).
*/
diff --git a/apps/dav/lib/Connector/Sabre/Node.php b/apps/dav/lib/Connector/Sabre/Node.php
index 1e32e74c325..ee159cef1d6 100644
--- a/apps/dav/lib/Connector/Sabre/Node.php
+++ b/apps/dav/lib/Connector/Sabre/Node.php
@@ -44,14 +44,12 @@ use OCP\Files\DavUtil;
use OCP\Files\FileInfo;
use OCP\Files\IRootFolder;
use OCP\Files\StorageNotAvailableException;
-use OCP\Share\IShare;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager;
abstract class Node implements \Sabre\DAV\INode {
-
/**
- * @var \OC\Files\View
+ * @var View
*/
protected $fileView;
@@ -69,10 +67,7 @@ abstract class Node implements \Sabre\DAV\INode {
*/
protected $property_cache = null;
- /**
- * @var \OCP\Files\FileInfo
- */
- protected $info;
+ protected FileInfo $info;
/**
* @var IManager
@@ -83,10 +78,6 @@ abstract class Node implements \Sabre\DAV\INode {
/**
* Sets up the node, expects a full path name
- *
- * @param \OC\Files\View $view
- * @param \OCP\Files\FileInfo $info
- * @param IManager $shareManager
*/
public function __construct(View $view, FileInfo $info, IManager $shareManager = null) {
$this->fileView = $view;
@@ -109,8 +100,12 @@ abstract class Node implements \Sabre\DAV\INode {
}
}
- protected function refreshInfo() {
- $this->info = $this->fileView->getFileInfo($this->path);
+ protected function refreshInfo(): void {
+ $info = $this->fileView->getFileInfo($this->path);
+ if ($info === false) {
+ throw new \Sabre\DAV\Exception('Failed to get fileinfo for '. $this->path);
+ }
+ $this->info = $info;
$root = \OC::$server->get(IRootFolder::class);
if ($this->info->getType() === FileInfo::TYPE_FOLDER) {
$this->node = new Folder($root, $this->fileView, $this->path, $this->info);
@@ -145,7 +140,6 @@ abstract class Node implements \Sabre\DAV\INode {
* @throws \Sabre\DAV\Exception\Forbidden
*/
public function setName($name) {
-
// rename is only allowed if the update privilege is granted
if (!($this->info->isUpdateable() || ($this->info->getMountPoint() instanceof MoveableMount && $this->info->getInternalPath() === ''))) {
throw new \Sabre\DAV\Exception\Forbidden();
@@ -233,9 +227,10 @@ abstract class Node implements \Sabre\DAV\INode {
/**
* Returns the size of the node, in bytes
*
- * @return integer
+ * @psalm-suppress ImplementedReturnTypeMismatch \Sabre\DAV\IFile::getSize signature does not support 32bit
+ * @return int|float
*/
- public function getSize() {
+ public function getSize(): int|float {
return $this->info->getSize();
}
@@ -271,7 +266,6 @@ abstract class Node implements \Sabre\DAV\INode {
* @return int
*/
public function getSharePermissions($user) {
-
// check of we access a federated share
if ($user !== null) {
try {
diff --git a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php
index ff7396a0825..ddf4b2773e0 100644
--- a/apps/dav/lib/Connector/Sabre/QuotaPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/QuotaPlugin.php
@@ -178,7 +178,7 @@ class QuotaPlugin extends \Sabre\DAV\ServerPlugin {
* This method is called before any HTTP method and validates there is enough free space to store the file
*
* @param string $path relative to the users home
- * @param int $length
+ * @param int|float|null $length
* @throws InsufficientStorage
* @return bool
*/
diff --git a/apps/dav/lib/Direct/DirectFile.php b/apps/dav/lib/Direct/DirectFile.php
index a4a1999aca7..45c2114747e 100644
--- a/apps/dav/lib/Direct/DirectFile.php
+++ b/apps/dav/lib/Direct/DirectFile.php
@@ -77,6 +77,10 @@ class DirectFile implements IFile {
return $this->file->getEtag();
}
+ /**
+ * @psalm-suppress ImplementedReturnTypeMismatch \Sabre\DAV\IFile::getSize signature does not support 32bit
+ * @return int|float
+ */
public function getSize() {
$this->getFile();
diff --git a/apps/dav/lib/Upload/UploadFile.php b/apps/dav/lib/Upload/UploadFile.php
index 49a2fadecf6..023d17955c1 100644
--- a/apps/dav/lib/Upload/UploadFile.php
+++ b/apps/dav/lib/Upload/UploadFile.php
@@ -29,7 +29,6 @@ use OCA\DAV\Connector\Sabre\File;
use Sabre\DAV\IFile;
class UploadFile implements IFile {
-
/** @var File */
private $file;
@@ -53,6 +52,10 @@ class UploadFile implements IFile {
return $this->file->getETag();
}
+ /**
+ * @psalm-suppress ImplementedReturnTypeMismatch \Sabre\DAV\IFile::getSize signature does not support 32bit
+ * @return int|float
+ */
public function getSize() {
return $this->file->getSize();
}
diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
index cfdf82e9b4f..69096d0cfbb 100644
--- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
@@ -125,7 +125,6 @@ class CalDavBackendTest extends AbstractCalDavBackend {
* @dataProvider providesSharingData
*/
public function testCalendarSharing($userCanRead, $userCanWrite, $groupCanRead, $groupCanWrite, $add): void {
-
/** @var IL10N|\PHPUnit\Framework\MockObject\MockObject $l10n */
$l10n = $this->createMock(IL10N::class);
$l10n
@@ -423,7 +422,12 @@ EOD;
$events[0] = $this->createEvent($calendarId, '20130912T130000Z', '20130912T140000Z');
$events[1] = $this->createEvent($calendarId, '20130912T150000Z', '20130912T170000Z');
$events[2] = $this->createEvent($calendarId, '20130912T173000Z', '20130912T220000Z');
- $events[3] = $this->createEvent($calendarId, '21130912T130000Z', '22130912T130000Z');
+ if (PHP_INT_SIZE > 8) {
+ $events[3] = $this->createEvent($calendarId, '21130912T130000Z', '22130912T130000Z');
+ } else {
+ /* On 32bit we do not support events after 2038 */
+ $events[3] = $this->createEvent($calendarId, '20370912T130000Z', '20370912T130000Z');
+ }
$result = $this->backend->calendarQuery($calendarId, [
'name' => '',
@@ -471,7 +475,7 @@ EOD;
'only-events' => [[0, 1, 2, 3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => null, 'end' => null], 'prop-filters' => []]],],
'start' => [[1, 2, 3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => new DateTime('2013-09-12 14:00:00', new DateTimeZone('UTC')), 'end' => null], 'prop-filters' => []]],],
'end' => [[0], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => null, 'end' => new DateTime('2013-09-12 14:00:00', new DateTimeZone('UTC'))], 'prop-filters' => []]],],
- 'future' => [[3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => new DateTime('2099-09-12 14:00:00', new DateTimeZone('UTC')), 'end' => null], 'prop-filters' => []]],],
+ 'future' => [[3], [], [['name' => 'VEVENT', 'is-not-defined' => false, 'comp-filters' => [], 'time-range' => ['start' => new DateTime('2036-09-12 14:00:00', new DateTimeZone('UTC')), 'end' => null], 'prop-filters' => []]],],
];
}
@@ -648,8 +652,15 @@ EOS;
* @dataProvider providesCalDataForGetDenormalizedData
*/
public function testGetDenormalizedData($expected, $key, $calData): void {
- $actual = $this->backend->getDenormalizedData($calData);
- $this->assertEquals($expected, $actual[$key]);
+ try {
+ $actual = $this->backend->getDenormalizedData($calData);
+ $this->assertEquals($expected, $actual[$key]);
+ } catch (\ValueError $e) {
+ if (($e->getMessage() === 'Epoch doesn\'t fit in a PHP integer') && (PHP_INT_SIZE < 8)) {
+ $this->markTestSkipped('This fail on 32bits because of PHP limitations in DateTime');
+ }
+ throw $e;
+ }
}
public function providesCalDataForGetDenormalizedData() {
diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
index dfff9493762..5e638bbcd89 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
@@ -228,13 +228,13 @@ class FilesPluginTest extends TestCase {
$this->assertEquals('00000123instanceid', $propFind->get(self::FILEID_PROPERTYNAME));
$this->assertEquals('123', $propFind->get(self::INTERNAL_FILEID_PROPERTYNAME));
$this->assertEquals('1973-11-29T21:33:09+00:00', $propFind->get(self::CREATIONDATE_PROPERTYNAME));
- $this->assertEquals(null, $propFind->get(self::SIZE_PROPERTYNAME));
+ $this->assertEquals(0, $propFind->get(self::SIZE_PROPERTYNAME));
$this->assertEquals('DWCKMSR', $propFind->get(self::PERMISSIONS_PROPERTYNAME));
$this->assertEquals('http://example.com/', $propFind->get(self::DOWNLOADURL_PROPERTYNAME));
$this->assertEquals('foo', $propFind->get(self::OWNER_ID_PROPERTYNAME));
$this->assertEquals('M. Foo', $propFind->get(self::OWNER_DISPLAY_NAME_PROPERTYNAME));
$this->assertEquals('my_fingerprint', $propFind->get(self::DATA_FINGERPRINT_PROPERTYNAME));
- $this->assertEquals([self::SIZE_PROPERTYNAME], $propFind->get404Properties());
+ $this->assertEquals([], $propFind->get404Properties());
}
public function testGetPropertiesStorageNotAvailable(): void {
diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
index d38031b03d4..3119d715bec 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
@@ -261,6 +261,8 @@ class FilesReportPluginTest extends \Test\TestCase {
$filesNode2 = $this->getMockBuilder(File::class)
->disableOriginalConstructor()
->getMock();
+ $filesNode2->method('getSize')
+ ->willReturn(10);
$this->userFolder->expects($this->exactly(2))
->method('getById')
diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php
index dabbeab978e..e4af2367906 100644
--- a/apps/files/appinfo/routes.php
+++ b/apps/files/appinfo/routes.php
@@ -40,12 +40,12 @@ namespace OCA\Files\AppInfo;
use OCA\Files\Controller\OpenLocalEditorController;
// Legacy routes above
-/** @var $this \OC\Route\Router */
+/** @var \OC\Route\Router $this */
$this->create('files_ajax_download', 'apps/files/ajax/download.php')
->actionInclude('files/ajax/download.php');
/** @var Application $application */
-$application = \OC::$server->query(Application::class);
+$application = \OC::$server->get(Application::class);
$application->registerRoutes(
$this,
[
diff --git a/apps/files/tests/HelperTest.php b/apps/files/tests/HelperTest.php
index 230e2c6cea2..423fd855a9e 100644
--- a/apps/files/tests/HelperTest.php
+++ b/apps/files/tests/HelperTest.php
@@ -93,7 +93,10 @@ class HelperTest extends \Test\TestCase {
/**
* @dataProvider sortDataProvider
*/
- public function testSortByName($sort, $sortDescending, $expectedOrder) {
+ public function testSortByName(string $sort, bool $sortDescending, array $expectedOrder) {
+ if (($sort === 'mtime') && (PHP_INT_SIZE < 8)) {
+ $this->markTestSkipped('Skip mtime sorting on 32bit');
+ }
$files = self::getTestFileList();
$files = \OCA\Files\Helper::sortFiles($files, $sort, $sortDescending);
$fileNames = [];
diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php
index 284f438fccd..ae02f37b575 100644
--- a/apps/files_external/lib/Lib/Storage/FTP.php
+++ b/apps/files_external/lib/Lib/Storage/FTP.php
@@ -140,7 +140,7 @@ class FTP extends Common {
}
}
- public function filesize($path) {
+ public function filesize($path): false|int|float {
$result = $this->getConnection()->size($this->buildPath($path));
if ($result === -1) {
return false;
diff --git a/apps/files_external/tests/client-cmd.sh b/apps/files_external/tests/client-cmd.sh
new file mode 100755
index 00000000000..c97045bea4c
--- /dev/null
+++ b/apps/files_external/tests/client-cmd.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+DC_IP=$1
+shift
+
+docker run --rm --name client -v /tmp/shared:/shared --dns $DC_IP --hostname client.domain.test icewind1991/samba-krb-test-client $@
diff --git a/apps/files_external/tests/setup-krb.sh b/apps/files_external/tests/setup-krb.sh
deleted file mode 100755
index 968ba80529e..00000000000
--- a/apps/files_external/tests/setup-krb.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-
-function getContainerHealth {
- docker inspect --format "{{.State.Health.Status}}" $1
-}
-
-function waitContainer {
- while STATUS=$(getContainerHealth $1); [ $STATUS != "healthy" ]; do
- if [ $STATUS == "unhealthy" ]; then
- echo "Failed!"
- exit -1
- fi
- printf .
- lf=$'\n'
- sleep 1
- done
- printf "$lf"
-}
-
-mkdir /tmp/shared
-
-# start the dc
-docker run -dit --name dc -v /tmp/shared:/shared --hostname krb.domain.test --cap-add SYS_ADMIN icewind1991/samba-krb-test-dc
-DC_IP=$(docker inspect dc --format '{{.NetworkSettings.IPAddress}}')
-
-waitContainer dc
-
-# start apache
-docker run -d --name apache -v $PWD:/var/www/html -v /tmp/shared:/shared --dns $DC_IP --hostname httpd.domain.test icewind1991/samba-krb-test-apache
-APACHE_IP=$(docker inspect apache --format '{{.NetworkSettings.IPAddress}}')
-
-# add the dns record for apache
-docker exec dc samba-tool dns add krb.domain.test domain.test httpd A $APACHE_IP -U administrator --password=passwOrd1
diff --git a/apps/files_external/tests/start-apache.sh b/apps/files_external/tests/start-apache.sh
new file mode 100755
index 00000000000..2c3e178e2ef
--- /dev/null
+++ b/apps/files_external/tests/start-apache.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+docker rm -f apache 2>/dev/null > /dev/null
+
+docker run -d --name apache -v $2:/var/www/html -v /tmp/shared:/shared --dns $1 --hostname httpd.domain.test icewind1991/samba-krb-test-apache 1>&2
+APACHE_IP=$(docker inspect apache --format '{{.NetworkSettings.IPAddress}}')
+
+# add the dns record for apache
+docker exec dc samba-tool dns add krb.domain.test domain.test httpd A $APACHE_IP -U administrator --password=passwOrd1 1>&2
+
+echo $APACHE_IP
diff --git a/apps/files_external/tests/start-dc.sh b/apps/files_external/tests/start-dc.sh
new file mode 100755
index 00000000000..45fbbfbf0b5
--- /dev/null
+++ b/apps/files_external/tests/start-dc.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+function getContainerHealth {
+ docker inspect --format "{{.State.Health.Status}}" $1
+}
+
+function waitContainer {
+ while STATUS=$(getContainerHealth $1); [ $STATUS != "healthy" ]; do
+ if [ $STATUS == "unhealthy" ]; then
+ echo "Failed!" 1>&2
+ exit -1
+ fi
+ printf . 1>&2
+ lf=$'\n'
+ sleep 1
+ done
+ printf "$lf" 1>&2
+}
+
+docker rm -f dc 2>/dev/null > /dev/null
+
+mkdir -p /tmp/shared
+
+# start the dc
+docker run -dit --name dc -v /tmp/shared:/shared --hostname krb.domain.test --cap-add SYS_ADMIN icewind1991/samba-krb-test-dc 1>&2
+
+waitContainer dc
+
+docker inspect dc --format '{{.NetworkSettings.IPAddress}}'
diff --git a/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php b/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php
index cb0ba707c0c..9c95428d7b7 100644
--- a/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php
+++ b/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php
@@ -139,7 +139,7 @@ class DefaultPublicShareTemplateProvider implements IPublicShareTemplateProvider
if ($freeSpace < FileInfo::SPACE_UNLIMITED) {
$freeSpace = (int)max($freeSpace, 0);
} else {
- $freeSpace = (int)((INF > 0) ? INF: PHP_INT_MAX); // work around https://bugs.php.net/bug.php?id=69188
+ $freeSpace = (INF > 0) ? INF: PHP_INT_MAX; // work around https://bugs.php.net/bug.php?id=69188
}
$hideFileList = !($share->getPermissions() & Constants::PERMISSION_READ);
diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php
index 4d7389be24e..d7661297e9e 100644
--- a/apps/files_sharing/tests/ApiTest.php
+++ b/apps/files_sharing/tests/ApiTest.php
@@ -205,6 +205,9 @@ class ApiTest extends TestCase {
$ocs->cleanup();
}
+ /**
+ * @group RoutingWeirdness
+ */
public function testCreateShareLink() {
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1);
$result = $ocs->createShare($this->folder, \OCP\Constants::PERMISSION_ALL, IShare::TYPE_LINK);
@@ -227,6 +230,9 @@ class ApiTest extends TestCase {
$ocs->cleanup();
}
+ /**
+ * @group RoutingWeirdness
+ */
public function testCreateShareLinkPublicUpload() {
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1);
$result = $ocs->createShare($this->folder, \OCP\Constants::PERMISSION_ALL, IShare::TYPE_LINK, null, 'true');
@@ -419,6 +425,7 @@ class ApiTest extends TestCase {
/**
* @medium
+ * @group RoutingWeirdness
*/
public function testPublicLinkUrl() {
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1);
@@ -837,7 +844,7 @@ class ApiTest extends TestCase {
// $request = $this->createRequest(['path' => $this->subfolder]);
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER2);
- $result1 = $ocs->getShares('false','false','false', $this->subfolder);
+ $result1 = $ocs->getShares('false', 'false', 'false', $this->subfolder);
$ocs->cleanup();
// test should return one share within $this->folder
@@ -1050,10 +1057,10 @@ class ApiTest extends TestCase {
$config->setAppValue('core', 'shareapi_enforce_expire_date', 'yes');
$dateWithinRange = new \DateTime();
- $dateWithinRange->setTime(0,0,0);
+ $dateWithinRange->setTime(0, 0, 0);
$dateWithinRange->add(new \DateInterval('P5D'));
$dateOutOfRange = new \DateTime();
- $dateOutOfRange->setTime(0,0,0);
+ $dateOutOfRange->setTime(0, 0, 0);
$dateOutOfRange->add(new \DateInterval('P8D'));
// update expire date to a valid value
@@ -1290,6 +1297,7 @@ class ApiTest extends TestCase {
* Make sure only ISO 8601 dates are accepted
*
* @dataProvider datesProvider
+ * @group RoutingWeirdness
*/
public function testPublicLinkExpireDate($date, $valid) {
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1);
@@ -1320,6 +1328,9 @@ class ApiTest extends TestCase {
$this->shareManager->deleteShare($share);
}
+ /**
+ * @group RoutingWeirdness
+ */
public function testCreatePublicLinkExpireDateValid() {
$config = \OC::$server->getConfig();
@@ -1343,7 +1354,7 @@ class ApiTest extends TestCase {
$this->assertEquals($url, $data['url']);
$share = $this->shareManager->getShareById('ocinternal:'.$data['id']);
- $date->setTime(0,0,0);
+ $date->setTime(0, 0, 0);
$this->assertEquals($date, $share->getExpirationDate());
$this->shareManager->deleteShare($share);
diff --git a/apps/files_trashbin/lib/Sabre/AbstractTrash.php b/apps/files_trashbin/lib/Sabre/AbstractTrash.php
index 412e432a19e..e02e4c5b8ba 100644
--- a/apps/files_trashbin/lib/Sabre/AbstractTrash.php
+++ b/apps/files_trashbin/lib/Sabre/AbstractTrash.php
@@ -57,7 +57,11 @@ abstract class AbstractTrash implements ITrash {
return $this->data;
}
- public function getSize(): int {
+ /**
+ * @psalm-suppress ImplementedReturnTypeMismatch \Sabre\DAV\IFile::getSize signature does not support 32bit
+ * @return int|float
+ */
+ public function getSize(): int|float {
return $this->data->getSize();
}
diff --git a/apps/files_trashbin/lib/Sabre/ITrash.php b/apps/files_trashbin/lib/Sabre/ITrash.php
index dcda1abe259..b6b4e70f3b9 100644
--- a/apps/files_trashbin/lib/Sabre/ITrash.php
+++ b/apps/files_trashbin/lib/Sabre/ITrash.php
@@ -39,7 +39,7 @@ interface ITrash {
public function getDeletionTime(): int;
- public function getSize();
+ public function getSize(): int|float;
public function getFileId(): int;
diff --git a/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php b/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php
index bf5d6bc65ae..3264c11f8fa 100644
--- a/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php
+++ b/apps/files_trashbin/tests/BackgroundJob/ExpireTrashTest.php
@@ -33,7 +33,6 @@ use OCP\IConfig;
use OCP\IUserManager;
use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
-use Psr\Log\LoggerInterface;
class ExpireTrashTest extends TestCase {
/** @var IConfig|MockObject */
@@ -61,7 +60,7 @@ class ExpireTrashTest extends TestCase {
$this->time = $this->createMock(ITimeFactory::class);
$this->time->method('getTime')
- ->willReturn(99999999999);
+ ->willReturn(999999999);
$this->jobList->expects($this->once())
->method('setLastRun');
diff --git a/apps/files_versions/lib/Db/VersionEntity.php b/apps/files_versions/lib/Db/VersionEntity.php
index d5adbcfa104..a37171ef93f 100644
--- a/apps/files_versions/lib/Db/VersionEntity.php
+++ b/apps/files_versions/lib/Db/VersionEntity.php
@@ -36,8 +36,8 @@ use OCP\DB\Types;
* @method void setFileId(int $fileId)
* @method int getTimestamp()
* @method void setTimestamp(int $timestamp)
- * @method int getSize()
- * @method void setSize(int $size)
+ * @method int|float getSize()
+ * @method void setSize(int|float $size)
* @method int getMimetype()
* @method void setMimetype(int $mimetype)
* @method array|null getMetadata()
@@ -78,4 +78,4 @@ class VersionEntity extends Entity implements JsonSerializable {
$this->metadata['label'] = $label;
$this->markFieldUpdated('metadata');
}
-} \ No newline at end of file
+}
diff --git a/apps/files_versions/lib/Sabre/VersionFile.php b/apps/files_versions/lib/Sabre/VersionFile.php
index 20ae25a7623..8fd97b0636f 100644
--- a/apps/files_versions/lib/Sabre/VersionFile.php
+++ b/apps/files_versions/lib/Sabre/VersionFile.php
@@ -68,7 +68,11 @@ class VersionFile implements IFile {
return (string)$this->version->getRevisionId();
}
- public function getSize(): int {
+ /**
+ * @psalm-suppress ImplementedReturnTypeMismatch \Sabre\DAV\IFile::getSize signature does not support 32bit
+ * @return int|float
+ */
+ public function getSize(): int|float {
return $this->version->getSize();
}
diff --git a/apps/files_versions/lib/Versions/IVersion.php b/apps/files_versions/lib/Versions/IVersion.php
index 8ab3357b1e2..8480658fa30 100644
--- a/apps/files_versions/lib/Versions/IVersion.php
+++ b/apps/files_versions/lib/Versions/IVersion.php
@@ -65,10 +65,10 @@ interface IVersion {
/**
* Get the size of this version
*
- * @return int
+ * @return int|float
* @since 15.0.0
*/
- public function getSize(): int;
+ public function getSize(): int|float;
/**
* Get the name of the source file at the time of making this version
diff --git a/apps/files_versions/lib/Versions/Version.php b/apps/files_versions/lib/Versions/Version.php
index e87c2a593d7..0dade222abc 100644
--- a/apps/files_versions/lib/Versions/Version.php
+++ b/apps/files_versions/lib/Versions/Version.php
@@ -40,7 +40,7 @@ class Version implements IVersion, INameableVersion {
private string $label;
- /** @var int */
+ /** @var int|float */
private $size;
/** @var string */
@@ -62,7 +62,7 @@ class Version implements IVersion, INameableVersion {
int $timestamp,
$revisionId,
string $name,
- int $size,
+ int|float $size,
string $mimetype,
string $path,
FileInfo $sourceFileInfo,
@@ -98,7 +98,7 @@ class Version implements IVersion, INameableVersion {
return $this->timestamp;
}
- public function getSize(): int {
+ public function getSize(): int|float {
return $this->size;
}
diff --git a/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php b/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php
index 442a7020d89..1d5812767ca 100644
--- a/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php
+++ b/apps/files_versions/tests/BackgroundJob/ExpireVersionsTest.php
@@ -33,7 +33,6 @@ use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
class ExpireVersionsTest extends TestCase {
-
/** @var IConfig|MockObject */
private $config;
@@ -70,7 +69,7 @@ class ExpireVersionsTest extends TestCase {
$timeFactory = $this->createMock(ITimeFactory::class);
$timeFactory->method('getTime')
->with()
- ->willReturn(99999999999);
+ ->willReturn(999999999);
$job = new ExpireVersions($this->config, $this->userManager, $this->expiration, $timeFactory);
$job->start($this->jobList);
diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php
index e5c5678efd3..9e2da244f7b 100644
--- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php
+++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php
@@ -73,7 +73,6 @@ use Psr\Log\LoggerInterface;
use Test\TestCase;
class UsersControllerTest extends TestCase {
-
/** @var IUserManager|MockObject */
protected $userManager;
/** @var IConfig|MockObject */
@@ -497,7 +496,7 @@ class UsersControllerTest extends TestCase {
->method('generate')
->with(10)
->willReturnCallback(function () {
- return (string)rand(1000000000, 9999999999);
+ return (string)rand(100000000, 999999999);
});
$this->assertTrue(key_exists(
diff --git a/apps/theming/l10n/bg.js b/apps/theming/l10n/bg.js
index 602b01bf499..f67436f2c48 100644
--- a/apps/theming/l10n/bg.js
+++ b/apps/theming/l10n/bg.js
@@ -21,6 +21,8 @@ OC.L10N.register(
"Could not write file to disk" : " Файлът не можа да бъде записан на диск",
"A PHP extension stopped the file upload" : "PHP разширение спря качването на файла",
"No file uploaded" : "Няма качен файл",
+ "Failed to clean up the old administration theming images folder" : "Неуспешно почистване на папка със стари изображения на администраторски теми",
+ "Failed to cleanup the old administration image folder" : "Неуспешно почистване на старата папка с изображения на администратора",
"You are already using a custom theme. Theming app settings might be overwritten by that." : "Вече използвате персонализирана тема. Настройките на приложението за теми могат да бъдат презаписани от това.",
"Theming" : "Теми",
"Appearance and accessibility" : "Изглед и достъпност",
diff --git a/apps/theming/l10n/bg.json b/apps/theming/l10n/bg.json
index 71044542fdb..a4d340eea73 100644
--- a/apps/theming/l10n/bg.json
+++ b/apps/theming/l10n/bg.json
@@ -19,6 +19,8 @@
"Could not write file to disk" : " Файлът не можа да бъде записан на диск",
"A PHP extension stopped the file upload" : "PHP разширение спря качването на файла",
"No file uploaded" : "Няма качен файл",
+ "Failed to clean up the old administration theming images folder" : "Неуспешно почистване на папка със стари изображения на администраторски теми",
+ "Failed to cleanup the old administration image folder" : "Неуспешно почистване на старата папка с изображения на администратора",
"You are already using a custom theme. Theming app settings might be overwritten by that." : "Вече използвате персонализирана тема. Настройките на приложението за теми могат да бъдат презаписани от това.",
"Theming" : "Теми",
"Appearance and accessibility" : "Изглед и достъпност",
diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml
index c1c39c135f8..e087a3179e8 100644
--- a/build/psalm-baseline.xml
+++ b/build/psalm-baseline.xml
@@ -241,33 +241,6 @@
<code>\Sabre\Uri\split($path)</code>
</UndefinedFunction>
</file>
- <file src="apps/dav/lib/CalDAV/Schedule/IMipPlugin.php">
- <ImplicitToStringCast occurrences="2">
- <code>$vevent-&gt;LOCATION</code>
- <code>$vevent-&gt;SUMMARY</code>
- </ImplicitToStringCast>
- <InvalidNullableReturnType occurrences="1">
- <code>string</code>
- </InvalidNullableReturnType>
- <NullableReturnStatement occurrences="1">
- <code>$lang-&gt;getValue()</code>
- </NullableReturnStatement>
- <UndefinedMethod occurrences="10">
- <code>getDateTime</code>
- <code>getDateTime</code>
- <code>getDateTime</code>
- <code>getDateTime</code>
- <code>getDateTime</code>
- <code>hasTime</code>
- <code>hasTime</code>
- <code>isFloating</code>
- <code>isFloating</code>
- <code>isFloating</code>
- </UndefinedMethod>
- <UndefinedPropertyFetch occurrences="1">
- <code>$iTipMessage-&gt;message-&gt;VEVENT-&gt;SUMMARY</code>
- </UndefinedPropertyFetch>
- </file>
<file src="apps/dav/lib/CalDAV/Schedule/Plugin.php">
<InvalidArgument occurrences="2">
<code>[$aclPlugin, 'propFind']</code>
@@ -894,14 +867,6 @@
<code>(int)$share['id']</code>
</InvalidScalarArgument>
</file>
- <file src="apps/federatedfilesharing/lib/Settings/Personal.php">
- <InvalidNullableReturnType occurrences="1">
- <code>string</code>
- </InvalidNullableReturnType>
- <NullableReturnStatement occurrences="1">
- <code>null</code>
- </NullableReturnStatement>
- </file>
<file src="apps/files/ajax/download.php">
<InvalidArgument occurrences="1">
<code>$files_list</code>
@@ -1086,12 +1051,6 @@
<InvalidArgument occurrences="1">
<code>$files_list</code>
</InvalidArgument>
- <InvalidScalarArgument occurrences="1">
- <code>$maxUploadFilesize</code>
- </InvalidScalarArgument>
- <NullArgument occurrences="1">
- <code>null</code>
- </NullArgument>
</file>
<file src="apps/files_sharing/lib/External/Scanner.php">
<MoreSpecificImplementedParamType occurrences="1">
@@ -2998,19 +2957,6 @@
<file src="lib/private/Log/Systemdlog.php">
<UndefinedFunction occurrences="1"/>
</file>
- <file src="lib/private/Mail/Mailer.php">
- <InvalidNullableReturnType occurrences="1">
- <code>string[]</code>
- </InvalidNullableReturnType>
- <NullableReturnStatement occurrences="1">
- <code>$failedRecipients</code>
- </NullableReturnStatement>
- <UndefinedInterfaceMethod occurrences="3">
- <code>getSubject</code>
- <code>getSwiftMessage</code>
- <code>getTo</code>
- </UndefinedInterfaceMethod>
- </file>
<file src="lib/private/Memcache/APCu.php">
<InvalidReturnStatement occurrences="1">
<code>apcu_add($this-&gt;getPrefix() . $key, $value, $ttl)</code>
diff --git a/core/Command/Log/File.php b/core/Command/Log/File.php
index f2c77e20174..6d6e530fe9a 100644
--- a/core/Command/Log/File.php
+++ b/core/Command/Log/File.php
@@ -115,14 +115,12 @@ class File extends Command implements Completion\CompletionAwareInterface {
}
/**
- * @param mixed $rotateSize
* @throws \InvalidArgumentException
*/
- protected function validateRotateSize(&$rotateSize) {
+ protected function validateRotateSize(false|int|float $rotateSize): void {
if ($rotateSize === false) {
throw new \InvalidArgumentException('Error parsing log rotation file size');
}
- $rotateSize = (int) $rotateSize;
if ($rotateSize < 0) {
throw new \InvalidArgumentException('Log rotation file size must be non-negative');
}
diff --git a/core/js/login/authpicker.js b/core/js/login/authpicker.js
index 8aaaf3d7361..1a94b02d72f 100644
--- a/core/js/login/authpicker.js
+++ b/core/js/login/authpicker.js
@@ -10,4 +10,6 @@ jQuery(document).ready(function() {
e.preventDefault();
document.location.href = e.target.attributes.action.value
})
+
+ $('#login-form input').removeAttr('disabled');
})
diff --git a/core/l10n/sq.js b/core/l10n/sq.js
deleted file mode 100644
index b9431377f0b..00000000000
--- a/core/l10n/sq.js
+++ /dev/null
@@ -1,215 +0,0 @@
-OC.L10N.register(
- "core",
- {
- "Please select a file." : "Ju lutem përzgjidhni një skedar.",
- "File is too big" : "Skedari është shumë i madh",
- "The selected file is not an image." : "Skedari i zgjedhur nuk është një imazh",
- "The selected file cannot be read." : "Skedari i zgjedhur nuk mund të lexohet",
- "The file was uploaded" : "Skedari u ngarkua",
- "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Kartela e ngarkuar tejkalon udhëzimin MAX_FILE_SIZE që qe përcaktuar te formulari HTML",
- "No file was uploaded" : "S’u ngarkua kartelë",
- "Missing a temporary folder" : "Mungon një dosje e përkohshme",
- "Invalid file provided" : "U dha kartelë e pavlefshme",
- "No image or file provided" : "S’u dha figurë apo kartelë",
- "Unknown filetype" : "Lloj i panjohur kartele",
- "An error occurred. Please contact your admin." : "Ndodhi një gabim. Ju lutemi, lidhuni me përgjegjësin tuaj.",
- "Invalid image" : "Figurë e pavlefshme",
- "No temporary profile picture available, try again" : "S’ka gati foto të përkohshme profili, riprovoni",
- "No crop data provided" : "S’u dhanë të dhëna qethjeje",
- "No valid crop data provided" : "S’u dhanë të dhëna qethjeje të vlefshme",
- "Crop is not square" : "Prerja s’është katrore",
- "State token does not match" : "Shenja shtetërore nuk përputhet",
- "Login" : "Hyrje",
- "Password reset is disabled" : "Opsioni për rigjenerimin e fjalëkalimit është çaktivizuar",
- "%s password reset" : "U ricaktua fjalëkalimi për %s",
- "Password reset" : "Fjalkalimi u rivendos",
- "Click the following button to reset your password. If you have not requested the password reset, then ignore this email." : "Klikoni butonin më poshtë për të rivendosur fjalëkalimin tuaj. Nëse nuk keni kërkuar rivendosjen e fjalëkalimit, atëherë injorojeni këtë email.",
- "Click the following link to reset your password. If you have not requested the password reset, then ignore this email." : "Klikoni ne 'link-un' e rradhes per te rivendosur fjalekalimin tuaj.Nese nuk e keni vendosur akoma fjalekalimin atehere mos e merrni parasysh kete email.",
- "Reset your password" : "Rivendosni nje fjalekalim te ri",
- "Nextcloud Server" : "Server Nextcloud",
- "Preparing update" : "Duke përgatitur përditësimin",
- "[%d / %d]: %s" : "[%d / %d]: %s",
- "Please use the command line updater because automatic updating is disabled in the config.php." : "Ju lutemi, përdorni përditësuesin e rreshtit të urdhrave, sepse përditësimi i vetvetishëm është i çaktivizuar te config.php.",
- "Turned on maintenance mode" : "Mënyra e mirëmbajtjes u aktivizua",
- "Turned off maintenance mode" : "Mënyra e mirëmbajtjes u çaktivizua",
- "Maintenance mode is kept active" : "Mënyra mirëmbajtje është mbajtur e aktivizuar",
- "Updating database schema" : "Po përditësohet skema e bazës së të dhënave",
- "Updated database" : "U përditësua baza e të dhënave",
- "Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)" : "Po kontrollohet nëse mund të përditësohet skema e bazës së të dhënave për %s (kjo mund të hajë shumë kohë, varet nga madhësia e bazës së të dhënave)",
- "Set log level to debug" : "Caktoni shkallë regjistrimi për diagnostikimin",
- "Reset log level" : "Rikthe te parazgjedhja shkallën e regjistrimit",
- "Starting code integrity check" : "Po fillohet kontroll integriteti për kodin",
- "Finished code integrity check" : "Përfundoi kontrolli i integritetit për kodin",
- "%s (incompatible)" : "%s (e papërputhshme)",
- "Already up to date" : "Tashmë e përditësuar",
- "PHP does not seem to be setup properly to query system environment variables. The test with getenv(\"PATH\") only returns an empty response." : "PHP-ja nuk duket të jetë ngritur si duhet për të kërkuar ndryshore mjedisi sistemi. Testi me getenv(\"PATH\") kthen vetëm një përgjigje të zbrazët.",
- "Your database does not run with \"READ COMMITTED\" transaction isolation level. This can cause problems when multiple actions are executed in parallel." : "Baza juaj e të dhënave nuk ekzekutohet me nivelin \"READ COMMITED\" e izolimit për ndërveprimet. Kjo mund të shkaktojë probleme, kur kryhen paralelisht disa veprime njëherësh.",
- "It was not possible to execute the cron job via CLI. The following technical errors have appeared:" : "Nuk ishte e mundur që të ekzekutohej puna cron nëpërmjet CLI. Gabimet teknike në vijim janë shfaqur :",
- "SQLite is currently being used as the backend database. For larger installations we recommend that you switch to a different database backend." : "SQLite po përdoret si bazë të dhënash e programit klient. Për instalime më të ngarkuara, këshillojmë të kalohet në një program tjetër klient baze të dhënash.",
- "This is particularly recommended when using the desktop client for file synchronisation." : "Kjo është veçanërisht e rekomanduar gjatë përdorimit të desktopit të klientit për sinkronizimin skedari. ",
- "Error occurred while checking server setup" : "Ndodhi një gabim gjatë kontrollit të rregullimit të shërbyesit",
- "unknown text" : "tekst i panjohur",
- "Hello world!" : "Hello world!",
- "sunny" : "me diell",
- "Hello {name}, the weather is {weather}" : "Tungjatjeta {name}, koha është {weather}",
- "Hello {name}" : "Tungjatjeta {name}",
- "<strong>These are your search results<script>alert(1)</script></strong>" : "<strong>Këto janë rezultatet e juaj të kërkimit<script> alarm(1)",
- "new" : "i/e re",
- "_download %n file_::_download %n files_" : ["shkarko %n kartelë","shkarko %n kartela"],
- "The update is in progress, leaving this page might interrupt the process in some environments." : "Përditësimi është në zhvillim, largimi nga faqja mund të ndërpres procesin në disa mjedise.",
- "Update to {version}" : "Përditëso në {version}",
- "An error occurred." : "Ndodhi një gabim.",
- "Please reload the page." : "Ju lutemi, ringarkoni faqen.",
- "The update was unsuccessful. For more information <a href=\"{url}\">check our forum post</a> covering this issue." : "Përditësimi qe i pasuksesshëm. Për më tepër të dhëna <a href=\"{url}\">shihni postimin te forumi ynë</a> lidhur me këtë çështje.",
- "The update was unsuccessful. Please report this issue to the <a href=\"https://github.com/nextcloud/server/issues\" target=\"_blank\">Nextcloud community</a>." : "Përditësimi ishte i pasuksesshëm. Ju lutem raportoni këtë problem në <a href=\"https://github.com/nextcloud/server/issues\" target=\"_blank\">Nextcloud community</a>.",
- "More apps" : "Më shumë aplikacione",
- "Log in" : "Hyni",
- "Logging in …" : "Duke u loguar ...",
- "Server side authentication failed!" : "Mirëfilltësimi më anë të shërbyesit dështoi!",
- "Please contact your administrator." : "Ju lutemi, lidhuni me përgjegjësin tuaj.",
- "An internal error occurred." : "Ndodhi një gabim i brendshëm.",
- "Please try again or contact your administrator." : "Ju lutemi, riprovoni ose lidhuni me përgjegjësin tuaj.",
- "Password" : "Fjalëkalim",
- "Wrong username or password." : "Emër përdoruesi ose fjalëkalim i gabuar.",
- "User disabled" : "Përdorues i çaktivizuar",
- "Username or email" : "Emër përdoruesi ose email",
- "Reset password" : "Ricaktoni fjalëkalimin",
- "Couldn't send reset email. Please contact your administrator." : "S’u dërgua dot email-i i ricaktimit. Ju lutemi, lidhuni me përgjegjësin tuaj.",
- "New password" : "Fjalëkalim i ri",
- "I know what I'm doing" : "E di se ç’bëj",
- "Skip" : "Kalo",
- "Forgot password?" : "Keni harruar fjalëkalimin?",
- "Back" : "Prapa",
- "Search" : "Kërko",
- "Settings" : "Rregullime",
- "Search contacts …" : "Kërko kontakte ...",
- "No contacts found" : "Nuk jane gjetur kontakte",
- "Show all contacts …" : "Shfaq të gjitha kontaktet",
- "Loading your contacts …" : "Kontaktet tuaja po ngarkohen ...",
- "Looking for {term} …" : "Duke kërkuar {për] ...",
- "No" : "Jo",
- "Yes" : "Po",
- "No files in here" : "Jo skedar këtu",
- "New folder" : "Dosje e re",
- "Name" : "Emri",
- "Size" : "Madhësi",
- "Modified" : "Modifikuar ",
- "\"{name}\" is an invalid file name." : "\"{name}\" është emër i pavlefshëm kartele.",
- "File name cannot be empty." : "Emri i kartelës s’mund të jetë i zbrazët.",
- "\"{name}\" is not an allowed filetype" : "{name}\" nuk është një tip skedari i lejuar",
- "{newName} already exists" : "{newName} ekziston tashmë",
- "Choose" : "Zgjidhni",
- "Copy" : "Kopjo",
- "Move" : "Lëvize",
- "Error loading file picker template: {error}" : "Gabim në ngarkimin e gjedhes së marrësit të kartelave: {error}",
- "OK" : "OK",
- "Error loading message template: {error}" : "Gabim gjatë ngarkimit të gjedhes së mesazheve: {error}",
- "read-only" : "vetëm për lexim",
- "_{count} file conflict_::_{count} file conflicts_" : ["{count} përplasje kartelash","{count} përplasje kartelash"],
- "One file conflict" : "Një përplasje kartele",
- "New Files" : "Kartela të Reja",
- "Already existing files" : "Kartela ekzistuese",
- "Which files do you want to keep?" : "Cilat kartela doni të mbani?",
- "If you select both versions, the copied file will have a number added to its name." : "Nëse përzgjidhni të dy versionet, kartelës së kopjuar do t’i shtohet një numër në emrin e saj.",
- "Cancel" : "Anuloje",
- "Continue" : "Vazhdo",
- "(all selected)" : "(krejt të përzgjedhurat)",
- "({count} selected)" : "({count} të përzgjedhura)",
- "Error loading file exists template" : "Gabim në ngarkimin e gjedhes kartela ekziston",
- "Pending" : "Në pritje",
- "Authentication required" : "Verifikim i kërkuar",
- "This action requires you to confirm your password" : "Ky veprim kërkon që të konfirmoni fjalëkalimin tuaj.",
- "Confirm" : "Konfirmo",
- "Failed to authenticate, try again" : "Dështoi në verifikim, provo përsëri",
- "seconds ago" : "sekonda më parë",
- "Connection to server lost" : "Lidhja me serverin u shkëput",
- "_Problem loading page, reloading in %n second_::_Problem loading page, reloading in %n seconds_" : ["Problem gjatë ngarkimit të faqes, rifreskimi në %n sekonda","Problem gjatë ngarkimit të faqes, rifreskimi në %n sekonda"],
- "Hide details" : "Fsheh detajet",
- "New in" : "I ri në ",
- "Very weak password" : "Fjalëkalim shumë i dobët",
- "Weak password" : "Fjalëkalim i dobët",
- "So-so password" : "Fjalëkalim çka",
- "Good password" : "Fjalëkalim i mirë",
- "Strong password" : "Fjalëkalim i fortë",
- "No action available" : "Jo veprim i mundur",
- "Error fetching contact actions" : "Gabim gjatë marrjes së veprimeve të kontaktit",
- "Non-existing tag #{tag}" : "Etiketë #{tag} që s’ekziston",
- "Restricted" : "I/E kufizuar",
- "Invisible" : "I padukshëm",
- "Delete" : "Fshije",
- "Rename" : "Riemërtoje",
- "Collaborative tags" : "Etiketa bashkëpunimi",
- "No tags found" : "Jo etiketime të gjetura",
- "Personal" : "Personale",
- "Users" : "Përdorues",
- "Apps" : "Aplikacione",
- "Admin" : "Admin",
- "Help" : "Ndihmë",
- "Access forbidden" : "Ndalohet hyrja",
- "Page not found" : "Faqja nuk u gjet ",
- "Error" : "Gabim",
- "Previous" : "I mëparshëm",
- "Internal Server Error" : "Gabim i Brendshëm Shërbyesi",
- "More details can be found in the server log." : "Më tepër hollësi mund të gjenden në regjistrin e shërbyesit.",
- "Technical details" : "Hollësi teknike",
- "Remote Address: %s" : "Adresë e Largët: %s",
- "Request ID: %s" : "ID Kërkese: %s",
- "Type: %s" : "Lloj: %s",
- "Code: %s" : "Kod: %s",
- "Message: %s" : "Mesazh: %s",
- "File: %s" : "Kartelë: %s",
- "Line: %s" : "Rresht: %s",
- "Trace" : "Gjurmim",
- "Security warning" : "Sinjalizim sigurie",
- "Your data directory and files are probably accessible from the internet because the .htaccess file does not work." : "Drejtoria juaj e të dhënave dhe kartelat tuaja ka shumë mundësi të jenë të arritshme që nga interneti, ngaqë kartela .htaccess s’funksionon.",
- "Create an <strong>admin account</strong>" : "Krijoni një <strong>llogari administruesi</strong>",
- "Username" : "Emër përdoruesi",
- "Storage & database" : "Depozitë & bazë të dhënash",
- "Data folder" : "Dosje të dhënash",
- "Configure the database" : "Formësoni bazën e të dhënave",
- "Only %s is available." : "Vetëm %s është gati.",
- "Install and activate additional PHP modules to choose other database types." : "Që të zgjidhni të tjera lloje bazash të dhënash, instaloni dhe aktivizoni module PHP shtesë.",
- "For more details check out the documentation." : "Për më tepër të dhëna shihni dokumentimin.",
- "Database user" : "Përdorues baze të dhënash",
- "Database password" : "Fjalëkalim baze të dhënash",
- "Database name" : "Emër baze të dhënash",
- "Database tablespace" : "Tablespace-i i database-it",
- "Database host" : "Strehë baze të dhënash",
- "Please specify the port number along with the host name (e.g., localhost:5432)." : "Ju lutem specifikoni numrin e portës së bashku me një emër hosti (p.sh. localhost:5432).",
- "Performance warning" : "Sinjalizim funksionimi",
- "Need help?" : "Ju duhet ndihmë?",
- "See the documentation" : "Shihni dokumentimin",
- "This application requires JavaScript for correct operation. Please {linkstart}enable JavaScript{linkend} and reload the page." : "Ky aplikacion lyp JavaScript për punim të saktë. Ju lutemi, {linkstart}aktivizoni JavaScript-in{linkend} dhe ringarkoni faqen.",
- "Confirm your password" : "Konfrimoni fjalëkalimin tuaj",
- "Connect to your account" : "Lidhuni me llogarinë tuaj",
- "App token" : "Çelës identifikues i API-t",
- "Grant access" : "Akordoji hyrje",
- "This share is password-protected" : "Kjo pjesë është e mbrojtur me fjalëkalim",
- "Go to %s" : "Shko tek %s",
- "Two-factor authentication" : "Verifikim dy-element",
- "Use backup code" : "Përdorni kodin e kopjes rezervë",
- "Cancel login" : "Anuloje hyrjen",
- "Error while validating your second factor" : "Gabim gjatë verifikimit të elementit të dytë",
- "App update required" : "Lypset përditësim aplikacioni",
- "These incompatible apps will be disabled:" : "Do të çaktivizohen këto aplikacione të papërputhshme:",
- "The theme %s has been disabled." : "Tema %s u çaktivizua.",
- "Please make sure that the database, the config folder and the data folder have been backed up before proceeding." : "Ju lutemi, para se të vazhdoni më tej, sigurohuni që baza e të dhënave, dosja e formësimeve dhe dosja e të dhënave janë kopjeruajtur.",
- "Start update" : "Fillo përditësimin",
- "To avoid timeouts with larger installations, you can instead run the following command from your installation directory:" : "Për të shmangur çaste bllokimi pune me instalime të mëdha, mundeni të ekzekutoni urdhrin vijues që nga drejtoria juaj e instalimit:",
- "Detailed logs" : "Regjistrime të hollësishme",
- "Update needed" : "Lyp përditësim",
- "Please use the command line updater because you have a big instance with more than 50 users." : "Ju lutemi,përdorni përditësuesin e rreshtit të urdhrave, sepse keni një instalim me mbi 50 përdorues",
- "I know that if I continue doing the update via web UI has the risk, that the request runs into a timeout and could cause data loss, but I have a backup and know how to restore my instance in case of a failure." : "Në qofte se unë vazhdoj të kryej përditësimin nëpëmjet web UI ka rrezik, që kërkesa mund të ndaloj dhe shkakton humbje të të dhënave, por unë di si ti rikthej të dhënat ne rast dështimi.",
- "Upgrade via web on my own risk" : "Përditëso me anë të internetit në rrezikun tim",
- "This %s instance is currently in maintenance mode, which may take a while." : "Kjo instancë %s hëpërhë gjendet nën mënyrën mirëmbajtje, çka mund të zgjasë ca.",
- "Contact your system administrator if this message persists or appeared unexpectedly." : "Nëse ky mesazh shfaqet vazhdimisht ose u shfaq papritmas, lidhuni me përgjegjësin e sistemit.",
- "[%d / %d]: Checking table %s" : "[%d / %d]: Po kontrollohet tabela %s",
- "restricted" : "e kufizuar",
- "invisible" : "e padukshme",
- "File not found" : "S’u gjet kartelë",
- "More" : "More",
- "Contacts" : "Kontaktet",
- "Contacts menu" : "Menuja e kontakteve",
- "Settings menu" : "Menuja e cilësimeve"
-},
-"nplurals=2; plural=(n != 1);");
diff --git a/core/l10n/sq.json b/core/l10n/sq.json
deleted file mode 100644
index d3ad88b7ffe..00000000000
--- a/core/l10n/sq.json
+++ /dev/null
@@ -1,213 +0,0 @@
-{ "translations": {
- "Please select a file." : "Ju lutem përzgjidhni një skedar.",
- "File is too big" : "Skedari është shumë i madh",
- "The selected file is not an image." : "Skedari i zgjedhur nuk është një imazh",
- "The selected file cannot be read." : "Skedari i zgjedhur nuk mund të lexohet",
- "The file was uploaded" : "Skedari u ngarkua",
- "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" : "Kartela e ngarkuar tejkalon udhëzimin MAX_FILE_SIZE që qe përcaktuar te formulari HTML",
- "No file was uploaded" : "S’u ngarkua kartelë",
- "Missing a temporary folder" : "Mungon një dosje e përkohshme",
- "Invalid file provided" : "U dha kartelë e pavlefshme",
- "No image or file provided" : "S’u dha figurë apo kartelë",
- "Unknown filetype" : "Lloj i panjohur kartele",
- "An error occurred. Please contact your admin." : "Ndodhi një gabim. Ju lutemi, lidhuni me përgjegjësin tuaj.",
- "Invalid image" : "Figurë e pavlefshme",
- "No temporary profile picture available, try again" : "S’ka gati foto të përkohshme profili, riprovoni",
- "No crop data provided" : "S’u dhanë të dhëna qethjeje",
- "No valid crop data provided" : "S’u dhanë të dhëna qethjeje të vlefshme",
- "Crop is not square" : "Prerja s’është katrore",
- "State token does not match" : "Shenja shtetërore nuk përputhet",
- "Login" : "Hyrje",
- "Password reset is disabled" : "Opsioni për rigjenerimin e fjalëkalimit është çaktivizuar",
- "%s password reset" : "U ricaktua fjalëkalimi për %s",
- "Password reset" : "Fjalkalimi u rivendos",
- "Click the following button to reset your password. If you have not requested the password reset, then ignore this email." : "Klikoni butonin më poshtë për të rivendosur fjalëkalimin tuaj. Nëse nuk keni kërkuar rivendosjen e fjalëkalimit, atëherë injorojeni këtë email.",
- "Click the following link to reset your password. If you have not requested the password reset, then ignore this email." : "Klikoni ne 'link-un' e rradhes per te rivendosur fjalekalimin tuaj.Nese nuk e keni vendosur akoma fjalekalimin atehere mos e merrni parasysh kete email.",
- "Reset your password" : "Rivendosni nje fjalekalim te ri",
- "Nextcloud Server" : "Server Nextcloud",
- "Preparing update" : "Duke përgatitur përditësimin",
- "[%d / %d]: %s" : "[%d / %d]: %s",
- "Please use the command line updater because automatic updating is disabled in the config.php." : "Ju lutemi, përdorni përditësuesin e rreshtit të urdhrave, sepse përditësimi i vetvetishëm është i çaktivizuar te config.php.",
- "Turned on maintenance mode" : "Mënyra e mirëmbajtjes u aktivizua",
- "Turned off maintenance mode" : "Mënyra e mirëmbajtjes u çaktivizua",
- "Maintenance mode is kept active" : "Mënyra mirëmbajtje është mbajtur e aktivizuar",
- "Updating database schema" : "Po përditësohet skema e bazës së të dhënave",
- "Updated database" : "U përditësua baza e të dhënave",
- "Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)" : "Po kontrollohet nëse mund të përditësohet skema e bazës së të dhënave për %s (kjo mund të hajë shumë kohë, varet nga madhësia e bazës së të dhënave)",
- "Set log level to debug" : "Caktoni shkallë regjistrimi për diagnostikimin",
- "Reset log level" : "Rikthe te parazgjedhja shkallën e regjistrimit",
- "Starting code integrity check" : "Po fillohet kontroll integriteti për kodin",
- "Finished code integrity check" : "Përfundoi kontrolli i integritetit për kodin",
- "%s (incompatible)" : "%s (e papërputhshme)",
- "Already up to date" : "Tashmë e përditësuar",
- "PHP does not seem to be setup properly to query system environment variables. The test with getenv(\"PATH\") only returns an empty response." : "PHP-ja nuk duket të jetë ngritur si duhet për të kërkuar ndryshore mjedisi sistemi. Testi me getenv(\"PATH\") kthen vetëm një përgjigje të zbrazët.",
- "Your database does not run with \"READ COMMITTED\" transaction isolation level. This can cause problems when multiple actions are executed in parallel." : "Baza juaj e të dhënave nuk ekzekutohet me nivelin \"READ COMMITED\" e izolimit për ndërveprimet. Kjo mund të shkaktojë probleme, kur kryhen paralelisht disa veprime njëherësh.",
- "It was not possible to execute the cron job via CLI. The following technical errors have appeared:" : "Nuk ishte e mundur që të ekzekutohej puna cron nëpërmjet CLI. Gabimet teknike në vijim janë shfaqur :",
- "SQLite is currently being used as the backend database. For larger installations we recommend that you switch to a different database backend." : "SQLite po përdoret si bazë të dhënash e programit klient. Për instalime më të ngarkuara, këshillojmë të kalohet në një program tjetër klient baze të dhënash.",
- "This is particularly recommended when using the desktop client for file synchronisation." : "Kjo është veçanërisht e rekomanduar gjatë përdorimit të desktopit të klientit për sinkronizimin skedari. ",
- "Error occurred while checking server setup" : "Ndodhi një gabim gjatë kontrollit të rregullimit të shërbyesit",
- "unknown text" : "tekst i panjohur",
- "Hello world!" : "Hello world!",
- "sunny" : "me diell",
- "Hello {name}, the weather is {weather}" : "Tungjatjeta {name}, koha është {weather}",
- "Hello {name}" : "Tungjatjeta {name}",
- "<strong>These are your search results<script>alert(1)</script></strong>" : "<strong>Këto janë rezultatet e juaj të kërkimit<script> alarm(1)",
- "new" : "i/e re",
- "_download %n file_::_download %n files_" : ["shkarko %n kartelë","shkarko %n kartela"],
- "The update is in progress, leaving this page might interrupt the process in some environments." : "Përditësimi është në zhvillim, largimi nga faqja mund të ndërpres procesin në disa mjedise.",
- "Update to {version}" : "Përditëso në {version}",
- "An error occurred." : "Ndodhi një gabim.",
- "Please reload the page." : "Ju lutemi, ringarkoni faqen.",
- "The update was unsuccessful. For more information <a href=\"{url}\">check our forum post</a> covering this issue." : "Përditësimi qe i pasuksesshëm. Për më tepër të dhëna <a href=\"{url}\">shihni postimin te forumi ynë</a> lidhur me këtë çështje.",
- "The update was unsuccessful. Please report this issue to the <a href=\"https://github.com/nextcloud/server/issues\" target=\"_blank\">Nextcloud community</a>." : "Përditësimi ishte i pasuksesshëm. Ju lutem raportoni këtë problem në <a href=\"https://github.com/nextcloud/server/issues\" target=\"_blank\">Nextcloud community</a>.",
- "More apps" : "Më shumë aplikacione",
- "Log in" : "Hyni",
- "Logging in …" : "Duke u loguar ...",
- "Server side authentication failed!" : "Mirëfilltësimi më anë të shërbyesit dështoi!",
- "Please contact your administrator." : "Ju lutemi, lidhuni me përgjegjësin tuaj.",
- "An internal error occurred." : "Ndodhi një gabim i brendshëm.",
- "Please try again or contact your administrator." : "Ju lutemi, riprovoni ose lidhuni me përgjegjësin tuaj.",
- "Password" : "Fjalëkalim",
- "Wrong username or password." : "Emër përdoruesi ose fjalëkalim i gabuar.",
- "User disabled" : "Përdorues i çaktivizuar",
- "Username or email" : "Emër përdoruesi ose email",
- "Reset password" : "Ricaktoni fjalëkalimin",
- "Couldn't send reset email. Please contact your administrator." : "S’u dërgua dot email-i i ricaktimit. Ju lutemi, lidhuni me përgjegjësin tuaj.",
- "New password" : "Fjalëkalim i ri",
- "I know what I'm doing" : "E di se ç’bëj",
- "Skip" : "Kalo",
- "Forgot password?" : "Keni harruar fjalëkalimin?",
- "Back" : "Prapa",
- "Search" : "Kërko",
- "Settings" : "Rregullime",
- "Search contacts …" : "Kërko kontakte ...",
- "No contacts found" : "Nuk jane gjetur kontakte",
- "Show all contacts …" : "Shfaq të gjitha kontaktet",
- "Loading your contacts …" : "Kontaktet tuaja po ngarkohen ...",
- "Looking for {term} …" : "Duke kërkuar {për] ...",
- "No" : "Jo",
- "Yes" : "Po",
- "No files in here" : "Jo skedar këtu",
- "New folder" : "Dosje e re",
- "Name" : "Emri",
- "Size" : "Madhësi",
- "Modified" : "Modifikuar ",
- "\"{name}\" is an invalid file name." : "\"{name}\" është emër i pavlefshëm kartele.",
- "File name cannot be empty." : "Emri i kartelës s’mund të jetë i zbrazët.",
- "\"{name}\" is not an allowed filetype" : "{name}\" nuk është një tip skedari i lejuar",
- "{newName} already exists" : "{newName} ekziston tashmë",
- "Choose" : "Zgjidhni",
- "Copy" : "Kopjo",
- "Move" : "Lëvize",
- "Error loading file picker template: {error}" : "Gabim në ngarkimin e gjedhes së marrësit të kartelave: {error}",
- "OK" : "OK",
- "Error loading message template: {error}" : "Gabim gjatë ngarkimit të gjedhes së mesazheve: {error}",
- "read-only" : "vetëm për lexim",
- "_{count} file conflict_::_{count} file conflicts_" : ["{count} përplasje kartelash","{count} përplasje kartelash"],
- "One file conflict" : "Një përplasje kartele",
- "New Files" : "Kartela të Reja",
- "Already existing files" : "Kartela ekzistuese",
- "Which files do you want to keep?" : "Cilat kartela doni të mbani?",
- "If you select both versions, the copied file will have a number added to its name." : "Nëse përzgjidhni të dy versionet, kartelës së kopjuar do t’i shtohet një numër në emrin e saj.",
- "Cancel" : "Anuloje",
- "Continue" : "Vazhdo",
- "(all selected)" : "(krejt të përzgjedhurat)",
- "({count} selected)" : "({count} të përzgjedhura)",
- "Error loading file exists template" : "Gabim në ngarkimin e gjedhes kartela ekziston",
- "Pending" : "Në pritje",
- "Authentication required" : "Verifikim i kërkuar",
- "This action requires you to confirm your password" : "Ky veprim kërkon që të konfirmoni fjalëkalimin tuaj.",
- "Confirm" : "Konfirmo",
- "Failed to authenticate, try again" : "Dështoi në verifikim, provo përsëri",
- "seconds ago" : "sekonda më parë",
- "Connection to server lost" : "Lidhja me serverin u shkëput",
- "_Problem loading page, reloading in %n second_::_Problem loading page, reloading in %n seconds_" : ["Problem gjatë ngarkimit të faqes, rifreskimi në %n sekonda","Problem gjatë ngarkimit të faqes, rifreskimi në %n sekonda"],
- "Hide details" : "Fsheh detajet",
- "New in" : "I ri në ",
- "Very weak password" : "Fjalëkalim shumë i dobët",
- "Weak password" : "Fjalëkalim i dobët",
- "So-so password" : "Fjalëkalim çka",
- "Good password" : "Fjalëkalim i mirë",
- "Strong password" : "Fjalëkalim i fortë",
- "No action available" : "Jo veprim i mundur",
- "Error fetching contact actions" : "Gabim gjatë marrjes së veprimeve të kontaktit",
- "Non-existing tag #{tag}" : "Etiketë #{tag} që s’ekziston",
- "Restricted" : "I/E kufizuar",
- "Invisible" : "I padukshëm",
- "Delete" : "Fshije",
- "Rename" : "Riemërtoje",
- "Collaborative tags" : "Etiketa bashkëpunimi",
- "No tags found" : "Jo etiketime të gjetura",
- "Personal" : "Personale",
- "Users" : "Përdorues",
- "Apps" : "Aplikacione",
- "Admin" : "Admin",
- "Help" : "Ndihmë",
- "Access forbidden" : "Ndalohet hyrja",
- "Page not found" : "Faqja nuk u gjet ",
- "Error" : "Gabim",
- "Previous" : "I mëparshëm",
- "Internal Server Error" : "Gabim i Brendshëm Shërbyesi",
- "More details can be found in the server log." : "Më tepër hollësi mund të gjenden në regjistrin e shërbyesit.",
- "Technical details" : "Hollësi teknike",
- "Remote Address: %s" : "Adresë e Largët: %s",
- "Request ID: %s" : "ID Kërkese: %s",
- "Type: %s" : "Lloj: %s",
- "Code: %s" : "Kod: %s",
- "Message: %s" : "Mesazh: %s",
- "File: %s" : "Kartelë: %s",
- "Line: %s" : "Rresht: %s",
- "Trace" : "Gjurmim",
- "Security warning" : "Sinjalizim sigurie",
- "Your data directory and files are probably accessible from the internet because the .htaccess file does not work." : "Drejtoria juaj e të dhënave dhe kartelat tuaja ka shumë mundësi të jenë të arritshme që nga interneti, ngaqë kartela .htaccess s’funksionon.",
- "Create an <strong>admin account</strong>" : "Krijoni një <strong>llogari administruesi</strong>",
- "Username" : "Emër përdoruesi",
- "Storage & database" : "Depozitë & bazë të dhënash",
- "Data folder" : "Dosje të dhënash",
- "Configure the database" : "Formësoni bazën e të dhënave",
- "Only %s is available." : "Vetëm %s është gati.",
- "Install and activate additional PHP modules to choose other database types." : "Që të zgjidhni të tjera lloje bazash të dhënash, instaloni dhe aktivizoni module PHP shtesë.",
- "For more details check out the documentation." : "Për më tepër të dhëna shihni dokumentimin.",
- "Database user" : "Përdorues baze të dhënash",
- "Database password" : "Fjalëkalim baze të dhënash",
- "Database name" : "Emër baze të dhënash",
- "Database tablespace" : "Tablespace-i i database-it",
- "Database host" : "Strehë baze të dhënash",
- "Please specify the port number along with the host name (e.g., localhost:5432)." : "Ju lutem specifikoni numrin e portës së bashku me një emër hosti (p.sh. localhost:5432).",
- "Performance warning" : "Sinjalizim funksionimi",
- "Need help?" : "Ju duhet ndihmë?",
- "See the documentation" : "Shihni dokumentimin",
- "This application requires JavaScript for correct operation. Please {linkstart}enable JavaScript{linkend} and reload the page." : "Ky aplikacion lyp JavaScript për punim të saktë. Ju lutemi, {linkstart}aktivizoni JavaScript-in{linkend} dhe ringarkoni faqen.",
- "Confirm your password" : "Konfrimoni fjalëkalimin tuaj",
- "Connect to your account" : "Lidhuni me llogarinë tuaj",
- "App token" : "Çelës identifikues i API-t",
- "Grant access" : "Akordoji hyrje",
- "This share is password-protected" : "Kjo pjesë është e mbrojtur me fjalëkalim",
- "Go to %s" : "Shko tek %s",
- "Two-factor authentication" : "Verifikim dy-element",
- "Use backup code" : "Përdorni kodin e kopjes rezervë",
- "Cancel login" : "Anuloje hyrjen",
- "Error while validating your second factor" : "Gabim gjatë verifikimit të elementit të dytë",
- "App update required" : "Lypset përditësim aplikacioni",
- "These incompatible apps will be disabled:" : "Do të çaktivizohen këto aplikacione të papërputhshme:",
- "The theme %s has been disabled." : "Tema %s u çaktivizua.",
- "Please make sure that the database, the config folder and the data folder have been backed up before proceeding." : "Ju lutemi, para se të vazhdoni më tej, sigurohuni që baza e të dhënave, dosja e formësimeve dhe dosja e të dhënave janë kopjeruajtur.",
- "Start update" : "Fillo përditësimin",
- "To avoid timeouts with larger installations, you can instead run the following command from your installation directory:" : "Për të shmangur çaste bllokimi pune me instalime të mëdha, mundeni të ekzekutoni urdhrin vijues që nga drejtoria juaj e instalimit:",
- "Detailed logs" : "Regjistrime të hollësishme",
- "Update needed" : "Lyp përditësim",
- "Please use the command line updater because you have a big instance with more than 50 users." : "Ju lutemi,përdorni përditësuesin e rreshtit të urdhrave, sepse keni një instalim me mbi 50 përdorues",
- "I know that if I continue doing the update via web UI has the risk, that the request runs into a timeout and could cause data loss, but I have a backup and know how to restore my instance in case of a failure." : "Në qofte se unë vazhdoj të kryej përditësimin nëpëmjet web UI ka rrezik, që kërkesa mund të ndaloj dhe shkakton humbje të të dhënave, por unë di si ti rikthej të dhënat ne rast dështimi.",
- "Upgrade via web on my own risk" : "Përditëso me anë të internetit në rrezikun tim",
- "This %s instance is currently in maintenance mode, which may take a while." : "Kjo instancë %s hëpërhë gjendet nën mënyrën mirëmbajtje, çka mund të zgjasë ca.",
- "Contact your system administrator if this message persists or appeared unexpectedly." : "Nëse ky mesazh shfaqet vazhdimisht ose u shfaq papritmas, lidhuni me përgjegjësin e sistemit.",
- "[%d / %d]: Checking table %s" : "[%d / %d]: Po kontrollohet tabela %s",
- "restricted" : "e kufizuar",
- "invisible" : "e padukshme",
- "File not found" : "S’u gjet kartelë",
- "More" : "More",
- "Contacts" : "Kontaktet",
- "Contacts menu" : "Menuja e kontakteve",
- "Settings menu" : "Menuja e cilësimeve"
-},"pluralForm" :"nplurals=2; plural=(n != 1);"
-} \ No newline at end of file
diff --git a/core/templates/loginflow/authpicker.php b/core/templates/loginflow/authpicker.php
index 68c53818a92..3f78081921d 100644
--- a/core/templates/loginflow/authpicker.php
+++ b/core/templates/loginflow/authpicker.php
@@ -47,7 +47,7 @@ $urlGenerator = $_['urlGenerator'];
<p id="redirect-link">
<form id="login-form" action="<?php p($urlGenerator->linkToRoute('core.ClientFlowLogin.grantPage', ['stateToken' => $_['stateToken'], 'clientIdentifier' => $_['clientIdentifier'], 'oauthState' => $_['oauthState'], 'user' => $_['user'], 'direct' => $_['direct']])) ?>" method="get">
- <input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>">
+ <input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>" disabled>
</form>
</p>
diff --git a/core/templates/loginflowv2/authpicker.php b/core/templates/loginflowv2/authpicker.php
index b7ff617bd30..0e18cc99ce1 100644
--- a/core/templates/loginflowv2/authpicker.php
+++ b/core/templates/loginflowv2/authpicker.php
@@ -47,7 +47,7 @@ $urlGenerator = $_['urlGenerator'];
<p id="redirect-link">
<form id="login-form" action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.grantPage', ['stateToken' => $_['stateToken'], 'user' => $_['user']])) ?>" method="get">
- <input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>">
+ <input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>" disabled>
</form>
</p>
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php
index b58b675cf9d..6e0934c8fa1 100644
--- a/lib/composer/composer/autoload_classmap.php
+++ b/lib/composer/composer/autoload_classmap.php
@@ -720,6 +720,7 @@ return array(
'OC\\AppFramework\\Services\\AppConfig' => $baseDir . '/lib/private/AppFramework/Services/AppConfig.php',
'OC\\AppFramework\\Services\\InitialState' => $baseDir . '/lib/private/AppFramework/Services/InitialState.php',
'OC\\AppFramework\\Utility\\ControllerMethodReflector' => $baseDir . '/lib/private/AppFramework/Utility/ControllerMethodReflector.php',
+ 'OC\\AppFramework\\Utility\\QueryNotFoundException' => $baseDir . '/lib/private/AppFramework/Utility/QueryNotFoundException.php',
'OC\\AppFramework\\Utility\\SimpleContainer' => $baseDir . '/lib/private/AppFramework/Utility/SimpleContainer.php',
'OC\\AppFramework\\Utility\\TimeFactory' => $baseDir . '/lib/private/AppFramework/Utility/TimeFactory.php',
'OC\\AppScriptDependency' => $baseDir . '/lib/private/AppScriptDependency.php',
diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php
index 50f520205ce..50aaa84ae77 100644
--- a/lib/composer/composer/autoload_static.php
+++ b/lib/composer/composer/autoload_static.php
@@ -753,6 +753,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OC\\AppFramework\\Services\\AppConfig' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Services/AppConfig.php',
'OC\\AppFramework\\Services\\InitialState' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Services/InitialState.php',
'OC\\AppFramework\\Utility\\ControllerMethodReflector' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Utility/ControllerMethodReflector.php',
+ 'OC\\AppFramework\\Utility\\QueryNotFoundException' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Utility/QueryNotFoundException.php',
'OC\\AppFramework\\Utility\\SimpleContainer' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Utility/SimpleContainer.php',
'OC\\AppFramework\\Utility\\TimeFactory' => __DIR__ . '/../../..' . '/lib/private/AppFramework/Utility/TimeFactory.php',
'OC\\AppScriptDependency' => __DIR__ . '/../../..' . '/lib/private/AppScriptDependency.php',
diff --git a/lib/l10n/eu.js b/lib/l10n/eu.js
index 4b2e3aa0656..2071bcccad6 100644
--- a/lib/l10n/eu.js
+++ b/lib/l10n/eu.js
@@ -227,28 +227,28 @@ OC.L10N.register(
"This can usually be fixed by giving the web server write access to the apps directory or disabling the App Store in the config file." : "Hau normalean konpondu daiteke web zerbitzariari aplikazioen direktorioko sarbidea emanez edo konfigurazioko fitxategian aplikazioen biltegia (App Store) desgaituz.",
"Cannot create \"data\" directory." : "Ezin da \"data\" direktorioa sortu.",
"This can usually be fixed by giving the web server write access to the root directory. See %s" : "Hau normalean konpondu daiteke web zerbitzariari root direktorioko idazketa sarbidea emanez. Ikus %s",
- "Permissions can usually be fixed by giving the web server write access to the root directory. See %s." : " 99% match \nNormalean baimenak konpondu daitezke web zerbitzariari root direktorioko sarbidea emanez. Ikus%s.",
+ "Permissions can usually be fixed by giving the web server write access to the root directory. See %s." : "Normalean baimenak konpondu daitezke web zerbitzariari root direktorioko sarbidea emanez. Ikus%s.",
"Your data directory is not writable." : "Zure datuen karpeta ez da idazgarria.",
- "Setting locale to %s failed." : "Lokala %sra ezartzeak huts egin du",
- "Please install one of these locales on your system and restart your web server." : "Mesedez, instalatu lokal hauetako bat zure sisteman eta berrabiarazi zure web zerbitzaria.",
+ "Setting locale to %s failed." : "Eskualde-ezarpenak %s(e)ra ezartzeak huts egin du",
+ "Please install one of these locales on your system and restart your web server." : "Mesedez, instalatu eskualde-ezarpen hauetako bat zure sisteman eta berrabiarazi zure web zerbitzaria.",
"PHP module %s not installed." : "PHPren %s modulua ez dago instalaturik.",
- "Please ask your server administrator to install the module." : "Mesedez eskatu zure zerbitzariaren kudeatzaileari modulua instala dezan.",
+ "Please ask your server administrator to install the module." : "Mesedez eskatu zure zerbitzariaren administratzaileari modulua instalatzeko.",
"PHP setting \"%s\" is not set to \"%s\"." : "\"%s\" PHP ezarpena ez dago \"%s\" gisa jarrita.",
"Adjusting this setting in php.ini will make Nextcloud run again" : "Ezarpen hau php.ini fitxategian doitzen bada, Nextcloud berriro exekutatuko da",
- "<code>mbstring.func_overload</code> is set to <code>%s</code> instead of the expected value <code>0</code>." : "<code>mbstring.func_overload</code><code>%s</code>-en ezartzen da espero den <code>0</code> balioaren ordez.",
- "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini." : "Arazo hau konpontzeko, ezarri<code>mbstring.func_overload</code> <code>0</code>-n zure php.ini-n.",
+ "<code>mbstring.func_overload</code> is set to <code>%s</code> instead of the expected value <code>0</code>." : "<code>mbstring.func_overload</code><code>%s</code>-en ezarrita dago, espero zen <code>0</code> balioaren ordez.",
+ "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini." : "Arazo hau konpontzeko, ezarri<code>mbstring.func_overload</code> <code>0</code>-en zure php.ini fitxategian.",
"libxml2 2.7.0 is at least required. Currently %s is installed." : "libxml2 2.7.0 bertsioa edo berriagoa behar da. Orain %s dago instalatuta.",
"To fix this issue update your libxml2 version and restart your web server." : "Arazo hori konpontzeko, eguneratu zure libxml2 bertsioa eta berrabiarazi web zerbitzaria.",
"PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP lerro bakarreko blokeak mozteko konfiguratua dagoela dirudi. Oinarrizko app batzuk eskuraezin bihurtuko dira.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Hau ziur aski cache/accelerator batek eragin du, hala nola Zend OPcache edo eAccelerator.",
- "PHP modules have been installed, but they are still listed as missing?" : "PHP moduluak instalatu dira, baina oraindik faltan bezala markatuta daude?",
- "Please ask your server administrator to restart the web server." : "Mesedez eskatu zerbitzariaren kudeatzaileari web zerbitzaria berrabiarazteko.",
+ "PHP modules have been installed, but they are still listed as missing?" : "PHP moduluak instalatu dira, baina oraindik falta direla jartzen du?",
+ "Please ask your server administrator to restart the web server." : "Mesedez eskatu zerbitzariaren administratzaileari web zerbitzaria berrabiarazteko.",
"The required %s config variable is not configured in the config.php file." : "Beharrezko %s config aldagaia ez dago konfiguratuta config.php fitxategian.",
- "Please ask your server administrator to check the Nextcloud configuration." : "Mesedez, eskatu zure zerbitzari-administratzaileari Nextcloud-en konfigurazioa egiaztatzeko.",
+ "Please ask your server administrator to check the Nextcloud configuration." : "Mesedez, eskatu zure zerbitzari administratzaileari Nextclouden konfigurazioa egiaztatzeko.",
"PostgreSQL >= 9 required." : "PostgreSQL >= 9 behar da",
"Please upgrade your database version." : "Mesedez eguneratu zure datu-basearen bertsioa.",
"Your data directory is readable by other users." : "Zure datuen karpeta beste erabiltzaileek irakur dezakete.",
- "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Mesedez aldatu baimenak 0770ra beste erabiltzaileek karpetan sartu ezin izateko.",
+ "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Aldatu baimenak 0770ra beste erabiltzaileek karpetan sartu ezin izateko.",
"Your data directory must be an absolute path." : "Zure datuen karpeta bide-izen absolutua izan behar da.",
"Check the value of \"datadirectory\" in your configuration." : "Egiaztatu \"datadirectory\"-ren balioa zure konfigurazioan.",
"Your data directory is invalid." : "Zure datuen karpeta baliogabea da.",
@@ -256,20 +256,21 @@ OC.L10N.register(
"Action \"%s\" not supported or implemented." : "\"%s\" ekintza ez da onartzen edo ez dago inplementaturik.",
"Authentication failed, wrong token or provider ID given" : "Autentifikazioak huts egin du, token edo hornitzaile ID okerra eman da",
"Parameters missing in order to complete the request. Missing Parameters: \"%s\"" : "Eskaera osatzeko parametroak falta dira. Falta diren parametroak: \"%s\"",
- "ID \"%1$s\" already used by cloud federation provider \"%2$s\"" : "\"%2$s\" hodei federazio-hornitzaileak dagoeneko erabiltzen duen \"%1$s\" IDa",
- "Cloud Federation Provider with ID: \"%s\" does not exist." : "IDa duen hodei federazio-hornitzailea: \"%s\" ez da existitzen.",
- "Could not obtain lock type %d on \"%s\"." : "Ezin da lortu sarraia mota %d \"%s\"-an.",
+ "ID \"%1$s\" already used by cloud federation provider \"%2$s\"" : " \"%1$s\" IDa dagoeneko erabiltzen du \"%2$s\" hodei federazio hornitzaileak",
+ "Cloud Federation Provider with ID: \"%s\" does not exist." : "Hodei federazio hornitzaile IDa: \"%s\" ez da existitzen.",
+ "Could not obtain lock type %d on \"%s\"." : "Ezin da lortu %d sarraila mota \"%s\"(e)n.",
"Storage unauthorized. %s" : "Biltegiratzea ez dago baimenduta. %s",
- "Storage incomplete configuration. %s" : "Biltegiratzea ez da osorik konfiguratu. %s",
+ "Storage incomplete configuration. %s" : "Biltegiratzea guztiz konfiguratu gabe dago. %s",
"Storage connection error. %s" : "Biltegiratze-konexioaren errorea. %s",
"Storage is temporarily not available" : "Biltegia ez dago erabilgarri aldi baterako",
"Storage connection timeout. %s" : "Biltegiratze-konexioa denboraz kanpo geratu da. %s",
"%s enter the database username and name." : "%s sartu datu-basearen erabiltzaile-izena eta izena.",
- "%s enter the database username." : "%s sartu datu basearen erabiltzaile izena.",
- "%s enter the database name." : "%s sartu datu basearen izena.",
- "%s you may not use dots in the database name" : "%s ezin duzu punturik erabili datu basearen izenean.",
- "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Badirudi %s instantzia hau 32 biteko PHP ingurune bat exekutatzen ari dela eta open_basedir aldagaia php.ini fitxategian konfiguratu dela. Honek arazoak sortuko ditu 4 GB baino gehiagoko fitxategiekin eta ez da gomendatzen.",
+ "%s enter the database username." : "%s sartu datu-basearen erabiltzaile-izena.",
+ "%s enter the database name." : "%s sartu datu-basearen izena.",
+ "%s you may not use dots in the database name" : "%s ezin duzu punturik erabili datu-basearen izenean.",
+ "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Badirudi %s instantzia hau 32 biteko PHP ingurune bat exekutatzen ari dela eta open_basedir aldagaia php.ini fitxategian konfiguratu dela. Honek arazoak sortuko ditu 4 GB baino gehiagoko fitxategiekin eta ez da batere gomendagarria.",
"Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Mesedez kendu open_basedir ezarpena zure php.ini-tik edo aldatu 64-biteko PHPra.",
- "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Erabiltzaile-izenean karaktere hauek soilik erabili daitezke: \"a-z\", \"A-Z\", \"0-9\", eta \"_.@-'\""
+ "The user limit has been reached and the user was not created. Check your notifications to learn more." : "Ezin izan da erabiltzailea sortu, erabiltzaile muga gainditu delako. Egiaztatu zure jakinarazpenak gehiago jakiteko.",
+ "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Erabiltzaile-izenean karaktere hauek soilik erabil daitezke: \"a-z\", \"A-Z\", \"0-9\", eta \"_.@-'\""
},
"nplurals=2; plural=(n != 1);");
diff --git a/lib/l10n/eu.json b/lib/l10n/eu.json
index 9eff82f3e38..b0481a625d3 100644
--- a/lib/l10n/eu.json
+++ b/lib/l10n/eu.json
@@ -225,28 +225,28 @@
"This can usually be fixed by giving the web server write access to the apps directory or disabling the App Store in the config file." : "Hau normalean konpondu daiteke web zerbitzariari aplikazioen direktorioko sarbidea emanez edo konfigurazioko fitxategian aplikazioen biltegia (App Store) desgaituz.",
"Cannot create \"data\" directory." : "Ezin da \"data\" direktorioa sortu.",
"This can usually be fixed by giving the web server write access to the root directory. See %s" : "Hau normalean konpondu daiteke web zerbitzariari root direktorioko idazketa sarbidea emanez. Ikus %s",
- "Permissions can usually be fixed by giving the web server write access to the root directory. See %s." : " 99% match \nNormalean baimenak konpondu daitezke web zerbitzariari root direktorioko sarbidea emanez. Ikus%s.",
+ "Permissions can usually be fixed by giving the web server write access to the root directory. See %s." : "Normalean baimenak konpondu daitezke web zerbitzariari root direktorioko sarbidea emanez. Ikus%s.",
"Your data directory is not writable." : "Zure datuen karpeta ez da idazgarria.",
- "Setting locale to %s failed." : "Lokala %sra ezartzeak huts egin du",
- "Please install one of these locales on your system and restart your web server." : "Mesedez, instalatu lokal hauetako bat zure sisteman eta berrabiarazi zure web zerbitzaria.",
+ "Setting locale to %s failed." : "Eskualde-ezarpenak %s(e)ra ezartzeak huts egin du",
+ "Please install one of these locales on your system and restart your web server." : "Mesedez, instalatu eskualde-ezarpen hauetako bat zure sisteman eta berrabiarazi zure web zerbitzaria.",
"PHP module %s not installed." : "PHPren %s modulua ez dago instalaturik.",
- "Please ask your server administrator to install the module." : "Mesedez eskatu zure zerbitzariaren kudeatzaileari modulua instala dezan.",
+ "Please ask your server administrator to install the module." : "Mesedez eskatu zure zerbitzariaren administratzaileari modulua instalatzeko.",
"PHP setting \"%s\" is not set to \"%s\"." : "\"%s\" PHP ezarpena ez dago \"%s\" gisa jarrita.",
"Adjusting this setting in php.ini will make Nextcloud run again" : "Ezarpen hau php.ini fitxategian doitzen bada, Nextcloud berriro exekutatuko da",
- "<code>mbstring.func_overload</code> is set to <code>%s</code> instead of the expected value <code>0</code>." : "<code>mbstring.func_overload</code><code>%s</code>-en ezartzen da espero den <code>0</code> balioaren ordez.",
- "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini." : "Arazo hau konpontzeko, ezarri<code>mbstring.func_overload</code> <code>0</code>-n zure php.ini-n.",
+ "<code>mbstring.func_overload</code> is set to <code>%s</code> instead of the expected value <code>0</code>." : "<code>mbstring.func_overload</code><code>%s</code>-en ezarrita dago, espero zen <code>0</code> balioaren ordez.",
+ "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini." : "Arazo hau konpontzeko, ezarri<code>mbstring.func_overload</code> <code>0</code>-en zure php.ini fitxategian.",
"libxml2 2.7.0 is at least required. Currently %s is installed." : "libxml2 2.7.0 bertsioa edo berriagoa behar da. Orain %s dago instalatuta.",
"To fix this issue update your libxml2 version and restart your web server." : "Arazo hori konpontzeko, eguneratu zure libxml2 bertsioa eta berrabiarazi web zerbitzaria.",
"PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP lerro bakarreko blokeak mozteko konfiguratua dagoela dirudi. Oinarrizko app batzuk eskuraezin bihurtuko dira.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Hau ziur aski cache/accelerator batek eragin du, hala nola Zend OPcache edo eAccelerator.",
- "PHP modules have been installed, but they are still listed as missing?" : "PHP moduluak instalatu dira, baina oraindik faltan bezala markatuta daude?",
- "Please ask your server administrator to restart the web server." : "Mesedez eskatu zerbitzariaren kudeatzaileari web zerbitzaria berrabiarazteko.",
+ "PHP modules have been installed, but they are still listed as missing?" : "PHP moduluak instalatu dira, baina oraindik falta direla jartzen du?",
+ "Please ask your server administrator to restart the web server." : "Mesedez eskatu zerbitzariaren administratzaileari web zerbitzaria berrabiarazteko.",
"The required %s config variable is not configured in the config.php file." : "Beharrezko %s config aldagaia ez dago konfiguratuta config.php fitxategian.",
- "Please ask your server administrator to check the Nextcloud configuration." : "Mesedez, eskatu zure zerbitzari-administratzaileari Nextcloud-en konfigurazioa egiaztatzeko.",
+ "Please ask your server administrator to check the Nextcloud configuration." : "Mesedez, eskatu zure zerbitzari administratzaileari Nextclouden konfigurazioa egiaztatzeko.",
"PostgreSQL >= 9 required." : "PostgreSQL >= 9 behar da",
"Please upgrade your database version." : "Mesedez eguneratu zure datu-basearen bertsioa.",
"Your data directory is readable by other users." : "Zure datuen karpeta beste erabiltzaileek irakur dezakete.",
- "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Mesedez aldatu baimenak 0770ra beste erabiltzaileek karpetan sartu ezin izateko.",
+ "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Aldatu baimenak 0770ra beste erabiltzaileek karpetan sartu ezin izateko.",
"Your data directory must be an absolute path." : "Zure datuen karpeta bide-izen absolutua izan behar da.",
"Check the value of \"datadirectory\" in your configuration." : "Egiaztatu \"datadirectory\"-ren balioa zure konfigurazioan.",
"Your data directory is invalid." : "Zure datuen karpeta baliogabea da.",
@@ -254,20 +254,21 @@
"Action \"%s\" not supported or implemented." : "\"%s\" ekintza ez da onartzen edo ez dago inplementaturik.",
"Authentication failed, wrong token or provider ID given" : "Autentifikazioak huts egin du, token edo hornitzaile ID okerra eman da",
"Parameters missing in order to complete the request. Missing Parameters: \"%s\"" : "Eskaera osatzeko parametroak falta dira. Falta diren parametroak: \"%s\"",
- "ID \"%1$s\" already used by cloud federation provider \"%2$s\"" : "\"%2$s\" hodei federazio-hornitzaileak dagoeneko erabiltzen duen \"%1$s\" IDa",
- "Cloud Federation Provider with ID: \"%s\" does not exist." : "IDa duen hodei federazio-hornitzailea: \"%s\" ez da existitzen.",
- "Could not obtain lock type %d on \"%s\"." : "Ezin da lortu sarraia mota %d \"%s\"-an.",
+ "ID \"%1$s\" already used by cloud federation provider \"%2$s\"" : " \"%1$s\" IDa dagoeneko erabiltzen du \"%2$s\" hodei federazio hornitzaileak",
+ "Cloud Federation Provider with ID: \"%s\" does not exist." : "Hodei federazio hornitzaile IDa: \"%s\" ez da existitzen.",
+ "Could not obtain lock type %d on \"%s\"." : "Ezin da lortu %d sarraila mota \"%s\"(e)n.",
"Storage unauthorized. %s" : "Biltegiratzea ez dago baimenduta. %s",
- "Storage incomplete configuration. %s" : "Biltegiratzea ez da osorik konfiguratu. %s",
+ "Storage incomplete configuration. %s" : "Biltegiratzea guztiz konfiguratu gabe dago. %s",
"Storage connection error. %s" : "Biltegiratze-konexioaren errorea. %s",
"Storage is temporarily not available" : "Biltegia ez dago erabilgarri aldi baterako",
"Storage connection timeout. %s" : "Biltegiratze-konexioa denboraz kanpo geratu da. %s",
"%s enter the database username and name." : "%s sartu datu-basearen erabiltzaile-izena eta izena.",
- "%s enter the database username." : "%s sartu datu basearen erabiltzaile izena.",
- "%s enter the database name." : "%s sartu datu basearen izena.",
- "%s you may not use dots in the database name" : "%s ezin duzu punturik erabili datu basearen izenean.",
- "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Badirudi %s instantzia hau 32 biteko PHP ingurune bat exekutatzen ari dela eta open_basedir aldagaia php.ini fitxategian konfiguratu dela. Honek arazoak sortuko ditu 4 GB baino gehiagoko fitxategiekin eta ez da gomendatzen.",
+ "%s enter the database username." : "%s sartu datu-basearen erabiltzaile-izena.",
+ "%s enter the database name." : "%s sartu datu-basearen izena.",
+ "%s you may not use dots in the database name" : "%s ezin duzu punturik erabili datu-basearen izenean.",
+ "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Badirudi %s instantzia hau 32 biteko PHP ingurune bat exekutatzen ari dela eta open_basedir aldagaia php.ini fitxategian konfiguratu dela. Honek arazoak sortuko ditu 4 GB baino gehiagoko fitxategiekin eta ez da batere gomendagarria.",
"Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Mesedez kendu open_basedir ezarpena zure php.ini-tik edo aldatu 64-biteko PHPra.",
- "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Erabiltzaile-izenean karaktere hauek soilik erabili daitezke: \"a-z\", \"A-Z\", \"0-9\", eta \"_.@-'\""
+ "The user limit has been reached and the user was not created. Check your notifications to learn more." : "Ezin izan da erabiltzailea sortu, erabiltzaile muga gainditu delako. Egiaztatu zure jakinarazpenak gehiago jakiteko.",
+ "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "Erabiltzaile-izenean karaktere hauek soilik erabil daitezke: \"a-z\", \"A-Z\", \"0-9\", eta \"_.@-'\""
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/lib/private/AppFramework/Utility/QueryNotFoundException.php b/lib/private/AppFramework/Utility/QueryNotFoundException.php
new file mode 100644
index 00000000000..04faaa51a4b
--- /dev/null
+++ b/lib/private/AppFramework/Utility/QueryNotFoundException.php
@@ -0,0 +1,41 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * @copyright Copyright (c) 2023, Ferdinand Thiessen <rpm@fthiessen.de>
+ *
+ * @author Ferdinand Thiessen <rpm@fthiessen.de>
+ *
+ * @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/>.
+ *
+ */
+
+namespace OC\AppFramework\Utility;
+
+use OCP\AppFramework\QueryException;
+use Psr\Container\NotFoundExceptionInterface;
+
+/**
+ * Private implementation of the `Psr\Container\NotFoundExceptionInterface`
+ *
+ * QueryNotFoundException is a simple wrapper over the `QueryException`
+ * to fulfill the PSR Container interface.
+ *
+ * You should not catch this class directly but the `NotFoundExceptionInterface`.
+ */
+class QueryNotFoundException extends QueryException implements NotFoundExceptionInterface {
+}
diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php
index 06e9d4a3ec7..89e4204c85e 100644
--- a/lib/private/AppFramework/Utility/SimpleContainer.php
+++ b/lib/private/AppFramework/Utility/SimpleContainer.php
@@ -127,7 +127,8 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
' Class can not be instantiated');
}
} catch (ReflectionException $e) {
- throw new QueryException($baseMsg . ' ' . $e->getMessage());
+ // Class does not exist
+ throw new QueryNotFoundException($baseMsg . ' ' . $e->getMessage());
}
}
@@ -145,7 +146,7 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
return $object;
}
- throw new QueryException('Could not resolve ' . $name . '!');
+ throw new QueryNotFoundException('Could not resolve ' . $name . '!');
}
/**
diff --git a/lib/private/Archive/Archive.php b/lib/private/Archive/Archive.php
index cef306230fd..ff6456113f8 100644
--- a/lib/private/Archive/Archive.php
+++ b/lib/private/Archive/Archive.php
@@ -50,9 +50,8 @@ abstract class Archive {
/**
* get the uncompressed size of a file in the archive
- * @return int|false
*/
- abstract public function filesize(string $path);
+ abstract public function filesize(string $path): false|int|float;
/**
* get the last modified time of a file in the archive
diff --git a/lib/private/Archive/TAR.php b/lib/private/Archive/TAR.php
index 79c09cbe9e2..9dc906384e0 100644
--- a/lib/private/Archive/TAR.php
+++ b/lib/private/Archive/TAR.php
@@ -165,10 +165,8 @@ class TAR extends Archive {
/**
* get the uncompressed size of a file in the archive
- *
- * @return int|false
*/
- public function filesize(string $path) {
+ public function filesize(string $path): false|int|float {
$stat = $this->getHeader($path);
return $stat['size'] ?? false;
}
diff --git a/lib/private/Archive/ZIP.php b/lib/private/Archive/ZIP.php
index 743d313f951..f98009ecc3a 100644
--- a/lib/private/Archive/ZIP.php
+++ b/lib/private/Archive/ZIP.php
@@ -91,9 +91,8 @@ class ZIP extends Archive {
/**
* get the uncompressed size of a file in the archive
- * @return int|false
*/
- public function filesize(string $path) {
+ public function filesize(string $path): false|int|float {
$stat = $this->zip->statName($path);
return $stat['size'] ?? false;
}
diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php
index 47c893ebbf1..b94be4c5497 100644
--- a/lib/private/Files/FileInfo.php
+++ b/lib/private/Files/FileInfo.php
@@ -81,10 +81,8 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
/**
* The size of the file/folder without any sub mount
- *
- * @var int
*/
- private $rawSize = 0;
+ private int|float $rawSize = 0;
/**
* @param string|boolean $path
@@ -207,7 +205,8 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
}
/**
- * @return int
+ * @param bool $includeMounts
+ * @return int|float
*/
public function getSize($includeMounts = true) {
if ($includeMounts) {
diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php
index 64a6fc57b27..500a13b1f9d 100644
--- a/lib/private/Files/Filesystem.php
+++ b/lib/private/Files/Filesystem.php
@@ -730,7 +730,7 @@ class Filesystem {
* get the filesystem info
*
* @param string $path
- * @param boolean $includeMountPoints whether to add mountpoint sizes,
+ * @param bool|string $includeMountPoints whether to add mountpoint sizes,
* defaults to true
* @return \OC\Files\FileInfo|false False if file does not exist
*/
diff --git a/lib/private/Files/Node/LazyFolder.php b/lib/private/Files/Node/LazyFolder.php
index 1bae0f52e59..cc1f64889a1 100644
--- a/lib/private/Files/Node/LazyFolder.php
+++ b/lib/private/Files/Node/LazyFolder.php
@@ -225,7 +225,7 @@ class LazyFolder implements \OCP\Files\Folder {
/**
* @inheritDoc
*/
- public function getSize($includeMounts = true) {
+ public function getSize($includeMounts = true): int|float {
return $this->__call(__FUNCTION__, func_get_args());
}
diff --git a/lib/private/Files/Node/Node.php b/lib/private/Files/Node/Node.php
index 8a752ff281d..6c4e0b0f908 100644
--- a/lib/private/Files/Node/Node.php
+++ b/lib/private/Files/Node/Node.php
@@ -209,11 +209,11 @@ class Node implements \OCP\Files\Node {
/**
* @param bool $includeMounts
- * @return int
+ * @return int|float
* @throws InvalidPathException
* @throws NotFoundException
*/
- public function getSize($includeMounts = true) {
+ public function getSize($includeMounts = true): int|float {
return $this->getFileInfo()->getSize($includeMounts);
}
diff --git a/lib/private/Files/Node/NonExistingFile.php b/lib/private/Files/Node/NonExistingFile.php
index e1d706006ba..b21a2a6c65b 100644
--- a/lib/private/Files/Node/NonExistingFile.php
+++ b/lib/private/Files/Node/NonExistingFile.php
@@ -65,7 +65,7 @@ class NonExistingFile extends File {
}
}
- public function getSize($includeMounts = true) {
+ public function getSize($includeMounts = true): int|float {
if ($this->fileInfo) {
return parent::getSize($includeMounts);
} else {
diff --git a/lib/private/Files/Node/NonExistingFolder.php b/lib/private/Files/Node/NonExistingFolder.php
index d99446e8ff8..100687c3e6f 100644
--- a/lib/private/Files/Node/NonExistingFolder.php
+++ b/lib/private/Files/Node/NonExistingFolder.php
@@ -66,7 +66,7 @@ class NonExistingFolder extends Folder {
}
}
- public function getSize($includeMounts = true) {
+ public function getSize($includeMounts = true): int|float {
if ($this->fileInfo) {
return parent::getSize($includeMounts);
} else {
diff --git a/lib/private/Files/Node/Root.php b/lib/private/Files/Node/Root.php
index ca930c1002c..8d0a65d2a68 100644
--- a/lib/private/Files/Node/Root.php
+++ b/lib/private/Files/Node/Root.php
@@ -290,9 +290,9 @@ class Root extends Folder implements IRootFolder {
/**
* @param bool $includeMounts
- * @return int
+ * @return int|float
*/
- public function getSize($includeMounts = true) {
+ public function getSize($includeMounts = true): int|float {
return 0;
}
diff --git a/lib/private/Files/SimpleFS/NewSimpleFile.php b/lib/private/Files/SimpleFS/NewSimpleFile.php
index e2d1ae274b1..1d0972bcc54 100644
--- a/lib/private/Files/SimpleFS/NewSimpleFile.php
+++ b/lib/private/Files/SimpleFS/NewSimpleFile.php
@@ -56,7 +56,7 @@ class NewSimpleFile implements ISimpleFile {
/**
* Get the size in bytes
*/
- public function getSize(): int {
+ public function getSize(): int|float {
if ($this->file) {
return $this->file->getSize();
} else {
diff --git a/lib/private/Files/SimpleFS/SimpleFile.php b/lib/private/Files/SimpleFS/SimpleFile.php
index a2571ac50e8..95ef332e2f5 100644
--- a/lib/private/Files/SimpleFS/SimpleFile.php
+++ b/lib/private/Files/SimpleFS/SimpleFile.php
@@ -46,7 +46,7 @@ class SimpleFile implements ISimpleFile {
/**
* Get the size in bytes
*/
- public function getSize(): int {
+ public function getSize(): int|float {
return $this->file->getSize();
}
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index 0c121feb11e..737c1e9d51e 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -121,7 +121,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
return $this->filetype($path) === 'file';
}
- public function filesize($path) {
+ public function filesize($path): false|int|float {
if ($this->is_dir($path)) {
return 0; //by definition
} else {
@@ -695,9 +695,9 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
$result = $this->copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath, true);
if ($result) {
if ($sourceStorage->is_dir($sourceInternalPath)) {
- $result = $result && $sourceStorage->rmdir($sourceInternalPath);
+ $result = $sourceStorage->rmdir($sourceInternalPath);
} else {
- $result = $result && $sourceStorage->unlink($sourceInternalPath);
+ $result = $sourceStorage->unlink($sourceInternalPath);
}
}
return $result;
diff --git a/lib/private/Files/Storage/FailedStorage.php b/lib/private/Files/Storage/FailedStorage.php
index d748b3410c3..ceb802570bf 100644
--- a/lib/private/Files/Storage/FailedStorage.php
+++ b/lib/private/Files/Storage/FailedStorage.php
@@ -80,7 +80,7 @@ class FailedStorage extends Common {
throw new StorageNotAvailableException($this->e->getMessage(), $this->e->getCode(), $this->e);
}
- public function filesize($path) {
+ public function filesize($path): false|int|float {
throw new StorageNotAvailableException($this->e->getMessage(), $this->e->getCode(), $this->e);
}
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index b021d40d335..fe6a6d6e21a 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -171,6 +171,11 @@ class Local extends \OC\Files\Storage\Common {
return false;
}
$statResult = @stat($fullPath);
+ if (PHP_INT_SIZE === 4 && $statResult && !$this->is_dir($path)) {
+ $filesize = $this->filesize($path);
+ $statResult['size'] = $filesize;
+ $statResult[7] = $filesize;
+ }
if (is_array($statResult)) {
$statResult['full_path'] = $fullPath;
}
@@ -237,11 +242,15 @@ class Local extends \OC\Files\Storage\Common {
return $filetype;
}
- public function filesize($path) {
+ public function filesize($path): false|int|float {
if (!$this->is_file($path)) {
return 0;
}
$fullPath = $this->getSourcePath($path);
+ if (PHP_INT_SIZE === 4) {
+ $helper = new \OC\LargeFileHelper;
+ return $helper->getFileSize($fullPath) ?? false;
+ }
return filesize($fullPath);
}
@@ -263,6 +272,10 @@ class Local extends \OC\Files\Storage\Common {
if (!$this->file_exists($path)) {
return false;
}
+ if (PHP_INT_SIZE === 4) {
+ $helper = new \OC\LargeFileHelper();
+ return $helper->getFileMtime($fullPath);
+ }
return filemtime($fullPath);
}
diff --git a/lib/private/Files/Storage/Wrapper/Availability.php b/lib/private/Files/Storage/Wrapper/Availability.php
index a4a6fa0bd16..693d943f0dc 100644
--- a/lib/private/Files/Storage/Wrapper/Availability.php
+++ b/lib/private/Files/Storage/Wrapper/Availability.php
@@ -165,7 +165,7 @@ class Availability extends Wrapper {
}
/** {@inheritdoc} */
- public function filesize($path) {
+ public function filesize($path): false|int|float {
$this->checkAvailability();
try {
return parent::filesize($path);
@@ -451,6 +451,9 @@ class Availability extends Wrapper {
}
/**
+ * @template T of StorageNotAvailableException|null
+ * @param T $e
+ * @psalm-return (T is null ? void : never)
* @throws StorageNotAvailableException
*/
protected function setUnavailable(?StorageNotAvailableException $e): void {
diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php
index ed680f5045d..6aba839d26d 100644
--- a/lib/private/Files/Storage/Wrapper/Encoding.php
+++ b/lib/private/Files/Storage/Wrapper/Encoding.php
@@ -210,11 +210,8 @@ class Encoding extends Wrapper {
/**
* see https://www.php.net/manual/en/function.filesize.php
* The result for filesize when called on a folder is required to be 0
- *
- * @param string $path
- * @return int|bool
*/
- public function filesize($path) {
+ public function filesize($path): false|int|float {
return $this->storage->filesize($this->findPathToUse($path));
}
diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php
index 0bd799507ff..4d860e623e0 100644
--- a/lib/private/Files/Storage/Wrapper/Encryption.php
+++ b/lib/private/Files/Storage/Wrapper/Encryption.php
@@ -133,11 +133,8 @@ class Encryption extends Wrapper {
/**
* see https://www.php.net/manual/en/function.filesize.php
* The result for filesize when called on a folder is required to be 0
- *
- * @param string $path
- * @return int
*/
- public function filesize($path) {
+ public function filesize($path): false|int|float {
$fullPath = $this->getFullPath($path);
/** @var CacheEntry $info */
diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php
index 9834ae5a954..4501c96d631 100644
--- a/lib/private/Files/Storage/Wrapper/Jail.php
+++ b/lib/private/Files/Storage/Wrapper/Jail.php
@@ -158,11 +158,8 @@ class Jail extends Wrapper {
/**
* see https://www.php.net/manual/en/function.filesize.php
* The result for filesize when called on a folder is required to be 0
- *
- * @param string $path
- * @return int|bool
*/
- public function filesize($path) {
+ public function filesize($path): false|int|float {
return $this->getWrapperStorage()->filesize($this->getUnjailedPath($path));
}
diff --git a/lib/private/Files/Storage/Wrapper/Wrapper.php b/lib/private/Files/Storage/Wrapper/Wrapper.php
index ed7e137fd88..26b4570cc75 100644
--- a/lib/private/Files/Storage/Wrapper/Wrapper.php
+++ b/lib/private/Files/Storage/Wrapper/Wrapper.php
@@ -148,11 +148,8 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea
/**
* see https://www.php.net/manual/en/function.filesize.php
* The result for filesize when called on a folder is required to be 0
- *
- * @param string $path
- * @return int|bool
*/
- public function filesize($path) {
+ public function filesize($path): false|int|float {
return $this->getWrapperStorage()->filesize($path);
}
diff --git a/lib/private/Files/Stream/Encryption.php b/lib/private/Files/Stream/Encryption.php
index cebf7bafced..bcf0a10740b 100644
--- a/lib/private/Files/Stream/Encryption.php
+++ b/lib/private/Files/Stream/Encryption.php
@@ -143,8 +143,8 @@ class Encryption extends Wrapper {
* @param \OC\Encryption\Util $util
* @param \OC\Encryption\File $file
* @param string $mode
- * @param int $size
- * @param int $unencryptedSize
+ * @param int|float $size
+ * @param int|float $unencryptedSize
* @param int $headerSize
* @param bool $signed
* @param string $wrapper stream wrapper class
@@ -158,7 +158,7 @@ class Encryption extends Wrapper {
\OC\Files\Storage\Storage $storage,
\OC\Files\Storage\Wrapper\Encryption $encStorage,
\OC\Encryption\Util $util,
- \OC\Encryption\File $file,
+ \OC\Encryption\File $file,
$mode,
$size,
$unencryptedSize,
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index 8f073da9164..f79a992c773 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -411,7 +411,7 @@ class View {
* @param string $path
* @return mixed
*/
- public function filesize($path) {
+ public function filesize(string $path) {
return $this->basicOperation('filesize', $path);
}
@@ -1372,9 +1372,8 @@ class View {
* get the filesystem info
*
* @param string $path
- * @param boolean|string $includeMountPoints true to add mountpoint sizes,
+ * @param bool|string $includeMountPoints true to add mountpoint sizes,
* 'ext' to add only ext storage mount point sizes. Defaults to true.
- * defaults to true
* @return \OC\Files\FileInfo|false False if file does not exist
*/
public function getFileInfo($path, $includeMountPoints = true) {
diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php
index a9c5a329620..2b2fed4e9f1 100755
--- a/lib/private/LargeFileHelper.php
+++ b/lib/private/LargeFileHelper.php
@@ -73,7 +73,7 @@ class LargeFileHelper {
*
* @return string Unsigned integer base-10 string
*/
- public function formatUnsignedInteger($number) {
+ public function formatUnsignedInteger(int|float|string $number): string {
if (is_float($number)) {
// Undo the effect of the php.ini setting 'precision'.
return number_format($number, 0, '', '');
@@ -98,7 +98,7 @@ class LargeFileHelper {
* @return null|int|float Number of bytes as number (float or int) or
* null on failure.
*/
- public function getFileSize($filename) {
+ public function getFileSize(string $filename): null|int|float {
$fileSize = $this->getFileSizeViaCurl($filename);
if (!is_null($fileSize)) {
return $fileSize;
@@ -118,7 +118,7 @@ class LargeFileHelper {
* @return null|int|float Number of bytes as number (float or int) or
* null on failure.
*/
- public function getFileSizeViaCurl($fileName) {
+ public function getFileSizeViaCurl(string $fileName): null|int|float {
if (\OC::$server->get(IniGetWrapper::class)->getString('open_basedir') === '') {
$encodedFileName = rawurlencode($fileName);
$ch = curl_init("file:///$encodedFileName");
@@ -146,7 +146,7 @@ class LargeFileHelper {
* @return null|int|float Number of bytes as number (float or int) or
* null on failure.
*/
- public function getFileSizeViaExec($filename) {
+ public function getFileSizeViaExec(string $filename): null|int|float {
if (\OCP\Util::isFunctionEnabled('exec')) {
$os = strtolower(php_uname('s'));
$arg = escapeshellarg($filename);
@@ -171,7 +171,7 @@ class LargeFileHelper {
*
* @return int|float Number of bytes as number (float or int).
*/
- public function getFileSizeNative($filename) {
+ public function getFileSizeNative(string $filename): int|float {
$result = filesize($filename);
if ($result < 0) {
// For file sizes between 2 GiB and 4 GiB, filesize() will return a
@@ -184,13 +184,10 @@ class LargeFileHelper {
/**
* Returns the current mtime for $fullPath
- *
- * @param string $fullPath
- * @return int
*/
- public function getFileMtime($fullPath) {
+ public function getFileMtime(string $fullPath): int {
try {
- $result = filemtime($fullPath);
+ $result = filemtime($fullPath) ?: -1;
} catch (\Exception $e) {
$result = - 1;
}
@@ -198,14 +195,14 @@ class LargeFileHelper {
if (\OCP\Util::isFunctionEnabled('exec')) {
$os = strtolower(php_uname('s'));
if (strpos($os, 'linux') !== false) {
- return $this->exec('stat -c %Y ' . escapeshellarg($fullPath));
+ return (int)($this->exec('stat -c %Y ' . escapeshellarg($fullPath)) ?? -1);
}
}
}
return $result;
}
- protected function exec($cmd) {
+ protected function exec(string $cmd): null|int|float {
$result = trim(exec($cmd));
return ctype_digit($result) ? 0 + $result : null;
}
diff --git a/lib/private/Lockdown/Filesystem/NullStorage.php b/lib/private/Lockdown/Filesystem/NullStorage.php
index 8427a4658d4..a3976733b1a 100644
--- a/lib/private/Lockdown/Filesystem/NullStorage.php
+++ b/lib/private/Lockdown/Filesystem/NullStorage.php
@@ -65,7 +65,7 @@ class NullStorage extends Common {
return ($path === '') ? 'dir' : false;
}
- public function filesize($path) {
+ public function filesize($path): false|int|float {
throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
}
diff --git a/lib/private/MemoryInfo.php b/lib/private/MemoryInfo.php
index ed6617d879d..266fb15a573 100644
--- a/lib/private/MemoryInfo.php
+++ b/lib/private/MemoryInfo.php
@@ -24,8 +24,11 @@ declare(strict_types=1);
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
+
namespace OC;
+use OCP\Util;
+
/**
* Helper class that covers memory info.
*/
@@ -45,14 +48,14 @@ class MemoryInfo {
/**
* Returns the php memory limit.
*
- * @return int The memory limit in bytes.
+ * @return int|float The memory limit in bytes.
*/
- public function getMemoryLimit(): int {
+ public function getMemoryLimit(): int|float {
$iniValue = trim(ini_get('memory_limit'));
if ($iniValue === '-1') {
return -1;
- } elseif (is_numeric($iniValue) === true) {
- return (int)$iniValue;
+ } elseif (is_numeric($iniValue)) {
+ return Util::numericToNumber($iniValue);
} else {
return $this->memoryLimitToBytes($iniValue);
}
@@ -62,11 +65,15 @@ class MemoryInfo {
* Converts the ini memory limit to bytes.
*
* @param string $memoryLimit The "memory_limit" ini value
- * @return int
*/
- private function memoryLimitToBytes(string $memoryLimit): int {
+ private function memoryLimitToBytes(string $memoryLimit): int|float {
$last = strtolower(substr($memoryLimit, -1));
- $memoryLimit = (int)substr($memoryLimit, 0, -1);
+ $number = substr($memoryLimit, 0, -1);
+ if (is_numeric($number)) {
+ $memoryLimit = Util::numericToNumber($number);
+ } else {
+ throw new \InvalidArgumentException($number.' is not a valid numeric string (in memory_limit ini directive)');
+ }
// intended fall through
switch ($last) {
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index e84a5e4987a..dc59eacbf57 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -247,13 +247,14 @@ class Setup {
];
}
- if (PHP_INT_SIZE < 8) {
+ if ($this->iniWrapper->getString('open_basedir') !== '' && PHP_INT_SIZE === 4) {
$errors[] = [
'error' => $this->l10n->t(
- 'It seems that this %s instance is running on a 32-bit PHP environment. 64-bit is required for 26 and higher.',
+ 'It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. ' .
+ 'This will lead to problems with files over 4 GB and is highly discouraged.',
[$this->defaults->getProductName()]
),
- 'hint' => $this->l10n->t('Please switch to 64-bit PHP.'),
+ 'hint' => $this->l10n->t('Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP.'),
];
}
diff --git a/lib/private/Streamer.php b/lib/private/Streamer.php
index f96646e3365..52f824fedf8 100644
--- a/lib/private/Streamer.php
+++ b/lib/private/Streamer.php
@@ -40,7 +40,7 @@ use ZipStreamer\ZipStreamer;
class Streamer {
// array of regexp. Matching user agents will get tar instead of zip
- private $preferTarFor = [ '/macintosh|mac os x/i' ];
+ private array $preferTarFor = [ '/macintosh|mac os x/i' ];
// streamer instance
private $streamerInstance;
@@ -49,11 +49,11 @@ class Streamer {
* Streamer constructor.
*
* @param IRequest $request
- * @param int $size The size of the files in bytes
+ * @param int|float $size The size of the files in bytes
* @param int $numberOfFiles The number of files (and directories) that will
* be included in the streamed file
*/
- public function __construct(IRequest $request, int $size, int $numberOfFiles) {
+ public function __construct(IRequest $request, int|float $size, int $numberOfFiles) {
/**
* zip32 constraints for a basic (without compression, volumes nor
* encryption) zip file according to the Zip specification:
@@ -85,7 +85,7 @@ class Streamer {
} elseif ($request->isUserAgent($this->preferTarFor)) {
$this->streamerInstance = new TarStreamer();
} else {
- $this->streamerInstance = new ZipStreamer(['zip64' => true]);
+ $this->streamerInstance = new ZipStreamer(['zip64' => PHP_INT_SIZE !== 4]);
}
}
@@ -149,11 +149,11 @@ class Streamer {
*
* @param resource $stream Stream to read data from
* @param string $internalName Filepath and name to be used in the archive.
- * @param int $size Filesize
- * @param int|bool $time File mtime as int, or false
+ * @param int|float $size Filesize
+ * @param int|false $time File mtime as int, or false
* @return bool $success
*/
- public function addFileFromStream($stream, string $internalName, int $size, $time): bool {
+ public function addFileFromStream($stream, string $internalName, int|float $size, $time): bool {
$options = [];
if ($time) {
$options = [
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index 09516674e9b..45a5b4c2160 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -137,9 +137,6 @@ class Updater extends BasicEmitter {
$success = true;
try {
- if (PHP_INT_SIZE < 8 && version_compare($currentVersion, '26.0.0.0', '>=')) {
- throw new HintException('You are running a 32-bit PHP version. Cannot upgrade to Nextcloud 26 and higher. Please switch to 64-bit PHP.');
- }
$this->doUpgrade($currentVersion, $installedVersion);
} catch (HintException $exception) {
$this->log->error($exception->getMessage(), [
diff --git a/lib/private/User/User.php b/lib/private/User/User.php
index 7044770b57e..2b975c290ba 100644
--- a/lib/private/User/User.php
+++ b/lib/private/User/User.php
@@ -513,13 +513,17 @@ class User implements IUser {
*
* @param string $quota
* @return void
+ * @throws InvalidArgumentException
* @since 9.0.0
*/
public function setQuota($quota) {
$oldQuota = $this->config->getUserValue($this->uid, 'files', 'quota', '');
if ($quota !== 'none' and $quota !== 'default') {
- $quota = OC_Helper::computerFileSize($quota);
- $quota = OC_Helper::humanFileSize((int)$quota);
+ $bytesQuota = OC_Helper::computerFileSize($quota);
+ if ($bytesQuota === false) {
+ throw new InvalidArgumentException('Failed to set quota to invalid value '.$quota);
+ }
+ $quota = OC_Helper::humanFileSize($bytesQuota);
}
if ($quota !== $oldQuota) {
$this->config->setUserValue($this->uid, 'files', 'quota', $quota);
diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php
index 6a3a44d6cc0..5655139b24a 100644
--- a/lib/private/legacy/OC_Files.php
+++ b/lib/private/legacy/OC_Files.php
@@ -59,14 +59,11 @@ class OC_Files {
public const UPLOAD_MIN_LIMIT_BYTES = 1048576; // 1 MiB
- private static $multipartBoundary = '';
+ private static string $multipartBoundary = '';
- /**
- * @return string
- */
- private static function getBoundary() {
+ private static function getBoundary(): string {
if (empty(self::$multipartBoundary)) {
- self::$multipartBoundary = md5(mt_rand());
+ self::$multipartBoundary = md5((string)mt_rand());
}
return self::$multipartBoundary;
}
@@ -76,7 +73,7 @@ class OC_Files {
* @param string $name
* @param array $rangeArray ('from'=>int,'to'=>int), ...
*/
- private static function sendHeaders($filename, $name, array $rangeArray) {
+ private static function sendHeaders($filename, $name, array $rangeArray): void {
OC_Response::setContentDispositionHeader($name, 'attachment');
header('Content-Transfer-Encoding: binary', true);
header('Pragma: public');// enable caching in IE
@@ -247,10 +244,10 @@ class OC_Files {
/**
* @param string $rangeHeaderPos
- * @param int $fileSize
+ * @param int|float $fileSize
* @return array $rangeArray ('from'=>int,'to'=>int), ...
*/
- private static function parseHttpRangeHeader($rangeHeaderPos, $fileSize) {
+ private static function parseHttpRangeHeader($rangeHeaderPos, $fileSize): array {
$rArray = explode(',', $rangeHeaderPos);
$minOffset = 0;
$ind = 0;
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php
index 9ecd05b0a73..c2036c7b863 100644
--- a/lib/private/legacy/OC_Helper.php
+++ b/lib/private/legacy/OC_Helper.php
@@ -49,6 +49,7 @@ use OCP\Files\Mount\IMountPoint;
use OCP\ICacheFactory;
use OCP\IBinaryFinder;
use OCP\IUser;
+use OCP\Util;
use Psr\Log\LoggerInterface;
/**
@@ -59,12 +60,12 @@ class OC_Helper {
/**
* Make a human file size
- * @param int $bytes file size in bytes
+ * @param int|float $bytes file size in bytes
* @return string a human readable file size
*
* Makes 2048 to 2 kB.
*/
- public static function humanFileSize($bytes) {
+ public static function humanFileSize(int|float $bytes): string {
if ($bytes < 0) {
return "?";
}
@@ -95,16 +96,16 @@ class OC_Helper {
/**
* Make a computer file size
* @param string $str file size in human readable format
- * @return int|false a file size in bytes
+ * @return false|int|float a file size in bytes
*
* Makes 2kB to 2048.
*
* Inspired by: https://www.php.net/manual/en/function.filesize.php#92418
*/
- public static function computerFileSize($str) {
+ public static function computerFileSize(string $str): false|int|float {
$str = strtolower($str);
if (is_numeric($str)) {
- return (int)$str;
+ return Util::numericToNumber($str);
}
$bytes_array = [
@@ -129,16 +130,14 @@ class OC_Helper {
return false;
}
- $bytes = round($bytes);
-
- return (int)$bytes;
+ return Util::numericToNumber(round($bytes));
}
/**
* Recursive copying of folders
* @param string $src source folder
* @param string $dest target folder
- *
+ * @return void
*/
public static function copyr($src, $dest) {
if (is_dir($src)) {
@@ -387,8 +386,8 @@ class OC_Helper {
* calculates the maximum upload size respecting system settings, free space and user quota
*
* @param string $dir the current folder where the user currently operates
- * @param int $freeSpace the number of bytes free on the storage holding $dir, if not set this will be received from the storage directly
- * @return int number of bytes representing
+ * @param int|float $freeSpace the number of bytes free on the storage holding $dir, if not set this will be received from the storage directly
+ * @return int|float number of bytes representing
*/
public static function maxUploadFilesize($dir, $freeSpace = null) {
if (is_null($freeSpace) || $freeSpace < 0) {
@@ -401,7 +400,7 @@ class OC_Helper {
* Calculate free space left within user quota
*
* @param string $dir the current folder where the user currently operates
- * @return int number of bytes representing
+ * @return int|float number of bytes representing
*/
public static function freeSpace($dir) {
$freeSpace = \OC\Files\Filesystem::free_space($dir);
@@ -416,12 +415,12 @@ class OC_Helper {
/**
* Calculate PHP upload limit
*
- * @return int PHP upload file size limit
+ * @return int|float PHP upload file size limit
*/
public static function uploadLimit() {
$ini = \OC::$server->get(IniGetWrapper::class);
- $upload_max_filesize = (int)OCP\Util::computerFileSize($ini->get('upload_max_filesize'));
- $post_max_size = (int)OCP\Util::computerFileSize($ini->get('post_max_size'));
+ $upload_max_filesize = Util::computerFileSize($ini->get('upload_max_filesize')) ?: 0;
+ $post_max_size = Util::computerFileSize($ini->get('post_max_size')) ?: 0;
if ($upload_max_filesize === 0 && $post_max_size === 0) {
return INF;
} elseif ($upload_max_filesize === 0 || $post_max_size === 0) {
@@ -582,7 +581,7 @@ class OC_Helper {
/**
* Get storage info including all mount points and quota
*/
- private static function getGlobalStorageInfo(int $quota, IUser $user, IMountPoint $mount): array {
+ private static function getGlobalStorageInfo(int|float $quota, IUser $user, IMountPoint $mount): array {
$rootInfo = \OC\Files\Filesystem::getFileInfo('', 'ext');
$used = $rootInfo['size'];
if ($used < 0) {
diff --git a/lib/private/legacy/OC_Response.php b/lib/private/legacy/OC_Response.php
index b849710e90b..e4525fe9e10 100644
--- a/lib/private/legacy/OC_Response.php
+++ b/lib/private/legacy/OC_Response.php
@@ -52,6 +52,19 @@ class OC_Response {
* @param string|int|float $length Length to be sent
*/
public static function setContentLengthHeader($length) {
+ if (PHP_INT_SIZE === 4) {
+ if ($length > PHP_INT_MAX && stripos(PHP_SAPI, 'apache') === 0) {
+ // Apache PHP SAPI casts Content-Length headers to PHP integers.
+ // This enforces a limit of PHP_INT_MAX (2147483647 on 32-bit
+ // platforms). So, if the length is greater than PHP_INT_MAX,
+ // we just do not send a Content-Length header to prevent
+ // bodies from being received incompletely.
+ return;
+ }
+ // Convert signed integer or float to unsigned base-10 string.
+ $lfh = new \OC\LargeFileHelper;
+ $length = $lfh->formatUnsignedInteger($length);
+ }
header('Content-Length: '.$length);
}
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index 6dc08341b18..7f06900feb0 100644
--- a/lib/private/legacy/OC_Util.php
+++ b/lib/private/legacy/OC_Util.php
@@ -146,7 +146,7 @@ class OC_Util {
/**
* check if share API enforces a default expire date
*
- * @return boolean
+ * @return bool
* @suppress PhanDeprecatedFunction
*/
public static function isDefaultExpireDateEnforced() {
@@ -159,7 +159,7 @@ class OC_Util {
* Get the quota of a user
*
* @param IUser|null $user
- * @return int|\OCP\Files\FileInfo::SPACE_UNLIMITED|false Quota bytes
+ * @return int|\OCP\Files\FileInfo::SPACE_UNLIMITED|false|float Quota bytes
*/
public static function getUserQuota(?IUser $user) {
if (is_null($user)) {
diff --git a/lib/public/AppFramework/QueryException.php b/lib/public/AppFramework/QueryException.php
index 3b73c92e7be..c525ddd8033 100644
--- a/lib/public/AppFramework/QueryException.php
+++ b/lib/public/AppFramework/QueryException.php
@@ -32,7 +32,7 @@ use Psr\Container\ContainerExceptionInterface;
/**
* Class QueryException
*
- * The class extends `NotFoundExceptionInterface` since 20.0.0
+ * The class extends `ContainerExceptionInterface` since 20.0.0
*
* @since 8.1.0
* @deprecated 20.0.0 catch \Psr\Container\ContainerExceptionInterface
diff --git a/lib/public/Files/FileInfo.php b/lib/public/Files/FileInfo.php
index 14edf6a7645..0e521cea65c 100644
--- a/lib/public/Files/FileInfo.php
+++ b/lib/public/Files/FileInfo.php
@@ -84,7 +84,7 @@ interface FileInfo {
* Get the size in bytes for the file or folder
*
* @param bool $includeMounts whether or not to include the size of any sub mounts, since 16.0.0
- * @return int
+ * @return int|float
* @since 7.0.0
*/
public function getSize($includeMounts = true);
diff --git a/lib/public/Files/Node.php b/lib/public/Files/Node.php
index b892d8e0a73..b49b4a0f83d 100644
--- a/lib/public/Files/Node.php
+++ b/lib/public/Files/Node.php
@@ -145,7 +145,7 @@ interface Node extends FileInfo {
* Get the size of the file or folder in bytes
*
* @param bool $includeMounts
- * @return int
+ * @return int|float
* @throws InvalidPathException
* @throws NotFoundException
* @since 6.0.0
diff --git a/lib/public/Files/SimpleFS/ISimpleFile.php b/lib/public/Files/SimpleFS/ISimpleFile.php
index 9050fe770b9..e55261497be 100644
--- a/lib/public/Files/SimpleFS/ISimpleFile.php
+++ b/lib/public/Files/SimpleFS/ISimpleFile.php
@@ -49,7 +49,7 @@ interface ISimpleFile {
*
* @since 11.0.0
*/
- public function getSize(): int;
+ public function getSize(): int|float;
/**
* Get the ETag
diff --git a/lib/public/Files/SimpleFS/InMemoryFile.php b/lib/public/Files/SimpleFS/InMemoryFile.php
index 393449d4f1f..ace9bef465a 100644
--- a/lib/public/Files/SimpleFS/InMemoryFile.php
+++ b/lib/public/Files/SimpleFS/InMemoryFile.php
@@ -68,7 +68,7 @@ class InMemoryFile implements ISimpleFile {
* @inheritdoc
* @since 16.0.0
*/
- public function getSize(): int {
+ public function getSize(): int|float {
return strlen($this->contents);
}
diff --git a/lib/public/Files/Storage.php b/lib/public/Files/Storage.php
index a0acb4508d2..ca5276af1e8 100644
--- a/lib/public/Files/Storage.php
+++ b/lib/public/Files/Storage.php
@@ -135,7 +135,7 @@ interface Storage extends IStorage {
* The result for filesize when called on a folder is required to be 0
*
* @param string $path
- * @return int|bool
+ * @return false|int|float
* @since 6.0.0
*/
public function filesize($path);
diff --git a/lib/public/Files/Storage/IStorage.php b/lib/public/Files/Storage/IStorage.php
index eb5522909c6..1084eb7c941 100644
--- a/lib/public/Files/Storage/IStorage.php
+++ b/lib/public/Files/Storage/IStorage.php
@@ -132,7 +132,7 @@ interface IStorage {
* The result for filesize when called on a folder is required to be 0
*
* @param string $path
- * @return int|bool
+ * @return false|int|float
* @since 9.0.0
*/
public function filesize($path);
diff --git a/lib/public/IContainer.php b/lib/public/IContainer.php
index 86595e1e8f7..b27ddabb8e2 100644
--- a/lib/public/IContainer.php
+++ b/lib/public/IContainer.php
@@ -33,6 +33,7 @@ use Closure;
use OCP\AppFramework\QueryException;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
+use Psr\Container\NotFoundExceptionInterface;
/**
* Class IContainer
@@ -70,6 +71,7 @@ interface IContainer extends ContainerInterface {
* @return mixed
* @psalm-return ($name is class-string ? T : mixed)
* @throws ContainerExceptionInterface if the query could not be resolved
+ * @throws NotFoundExceptionInterface if the name could not be found within the container
* @throws QueryException if the query could not be resolved
* @since 6.0.0
* @deprecated 20.0.0 use \Psr\Container\ContainerInterface::get
diff --git a/lib/public/Util.php b/lib/public/Util.php
index b2b3322fe86..69eccbbc5f6 100644
--- a/lib/public/Util.php
+++ b/lib/public/Util.php
@@ -340,24 +340,35 @@ class Util {
}
/**
+ * Converts string to int of float depending if it fits an int
+ * @param numeric-string|float|int $number numeric string
+ * @return int|float int if it fits, float if it is too big
+ * @since 26.0.0
+ */
+ public static function numericToNumber(string|float|int $number): int|float {
+ /* This is a hack to cast to (int|float) */
+ return 0 + (string)$number;
+ }
+
+ /**
* Make a human file size (2048 to 2 kB)
- * @param int $bytes file size in bytes
+ * @param int|float $bytes file size in bytes
* @return string a human readable file size
* @since 4.0.0
*/
- public static function humanFileSize($bytes) {
+ public static function humanFileSize(int|float $bytes): string {
return \OC_Helper::humanFileSize($bytes);
}
/**
* Make a computer file size (2 kB to 2048)
* @param string $str file size in a fancy format
- * @return float|false a file size in bytes
+ * @return false|int|float a file size in bytes
*
* Inspired by: https://www.php.net/manual/en/function.filesize.php#92418
* @since 4.0.0
*/
- public static function computerFileSize($str) {
+ public static function computerFileSize(string $str): false|int|float {
return \OC_Helper::computerFileSize($str);
}
@@ -474,31 +485,31 @@ class Util {
* calculates the maximum upload size respecting system settings, free space and user quota
*
* @param string $dir the current folder where the user currently operates
- * @param int $free the number of bytes free on the storage holding $dir, if not set this will be received from the storage directly
- * @return int number of bytes representing
+ * @param int|float|null $free the number of bytes free on the storage holding $dir, if not set this will be received from the storage directly
+ * @return int|float number of bytes representing
* @since 5.0.0
*/
- public static function maxUploadFilesize($dir, $free = null) {
+ public static function maxUploadFilesize(string $dir, int|float|null $free = null): int|float {
return \OC_Helper::maxUploadFilesize($dir, $free);
}
/**
* Calculate free space left within user quota
* @param string $dir the current folder where the user currently operates
- * @return int number of bytes representing
+ * @return int|float number of bytes representing
* @since 7.0.0
*/
- public static function freeSpace($dir) {
+ public static function freeSpace(string $dir): int|float {
return \OC_Helper::freeSpace($dir);
}
/**
* Calculate PHP upload limit
*
- * @return int number of bytes representing
+ * @return int|float number of bytes representing
* @since 7.0.0
*/
- public static function uploadLimit() {
+ public static function uploadLimit(): int|float {
return \OC_Helper::uploadLimit();
}
diff --git a/tests/lib/AppFramework/Utility/SimpleContainerTest.php b/tests/lib/AppFramework/Utility/SimpleContainerTest.php
index 8caaf517f5c..61b3299671b 100644
--- a/tests/lib/AppFramework/Utility/SimpleContainerTest.php
+++ b/tests/lib/AppFramework/Utility/SimpleContainerTest.php
@@ -26,6 +26,7 @@ declare(strict_types=1);
namespace Test\AppFramework\Utility;
use OC\AppFramework\Utility\SimpleContainer;
+use Psr\Container\NotFoundExceptionInterface;
interface TestInterface {
}
@@ -76,11 +77,31 @@ class SimpleContainerTest extends \Test\TestCase {
}
-
+ /**
+ * Test querying a class that is not registered without autoload enabled
+ */
public function testNothingRegistered() {
- $this->expectException(\OCP\AppFramework\QueryException::class);
+ try {
+ $this->container->query('something really hard', false);
+ $this->fail('Expected `QueryException` exception was not thrown');
+ } catch (\Throwable $exception) {
+ $this->assertInstanceOf(\OCP\AppFramework\QueryException::class, $exception);
+ $this->assertInstanceOf(NotFoundExceptionInterface::class, $exception);
+ }
+ }
+
- $this->container->query('something really hard');
+ /**
+ * Test querying a class that is not registered with autoload enabled
+ */
+ public function testNothingRegistered_autoload() {
+ try {
+ $this->container->query('something really hard');
+ $this->fail('Expected `QueryException` exception was not thrown');
+ } catch (\Throwable $exception) {
+ $this->assertInstanceOf(\OCP\AppFramework\QueryException::class, $exception);
+ $this->assertInstanceOf(NotFoundExceptionInterface::class, $exception);
+ }
}
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php
index 2189e7c09f4..f2195810bb7 100644
--- a/tests/lib/Files/ViewTest.php
+++ b/tests/lib/Files/ViewTest.php
@@ -1798,7 +1798,18 @@ class ViewTest extends \Test\TestCase {
['is_file', ['dir'], 'dir', null],
['stat', ['dir'], 'dir', null],
['filetype', ['dir'], 'dir', null],
- ['filesize', ['dir'], 'dir', null],
+ [
+ 'filesize',
+ ['dir'],
+ 'dir',
+ null,
+ ILockingProvider::LOCK_SHARED,
+ ILockingProvider::LOCK_SHARED,
+ ILockingProvider::LOCK_SHARED,
+ null,
+ /* Return an int */
+ 100
+ ],
['isCreatable', ['dir'], 'dir', null],
['isReadable', ['dir'], 'dir', null],
['isUpdatable', ['dir'], 'dir', null],
@@ -1832,7 +1843,8 @@ class ViewTest extends \Test\TestCase {
$expectedLockBefore = ILockingProvider::LOCK_SHARED,
$expectedLockDuring = ILockingProvider::LOCK_SHARED,
$expectedLockAfter = ILockingProvider::LOCK_SHARED,
- $expectedStrayLock = null
+ $expectedStrayLock = null,
+ $returnValue = true,
) {
$view = new View('/' . $this->user . '/files/');
@@ -1853,10 +1865,10 @@ class ViewTest extends \Test\TestCase {
$storage->expects($this->once())
->method($operation)
->willReturnCallback(
- function () use ($view, $lockedPath, &$lockTypeDuring) {
+ function () use ($view, $lockedPath, &$lockTypeDuring, $returnValue) {
$lockTypeDuring = $this->getFileLockType($view, $lockedPath);
- return true;
+ return $returnValue;
}
);
diff --git a/tests/lib/Memcache/APCuTest.php b/tests/lib/Memcache/APCuTest.php
index 50e3984ca34..3568b8a4622 100644
--- a/tests/lib/Memcache/APCuTest.php
+++ b/tests/lib/Memcache/APCuTest.php
@@ -9,6 +9,10 @@
namespace Test\Memcache;
+/**
+ * @group Memcache
+ * @group APCu
+ */
class APCuTest extends Cache {
protected function setUp(): void {
parent::setUp();
diff --git a/tests/lib/Memcache/ArrayCacheTest.php b/tests/lib/Memcache/ArrayCacheTest.php
index 4e3623d344d..47a39a82d5d 100644
--- a/tests/lib/Memcache/ArrayCacheTest.php
+++ b/tests/lib/Memcache/ArrayCacheTest.php
@@ -9,6 +9,9 @@
namespace Test\Memcache;
+/**
+ * @group Memcache
+ */
class ArrayCacheTest extends Cache {
protected function setUp(): void {
parent::setUp();
diff --git a/tests/lib/Memcache/CasTraitTest.php b/tests/lib/Memcache/CasTraitTest.php
index 61972153886..f077cf143b3 100644
--- a/tests/lib/Memcache/CasTraitTest.php
+++ b/tests/lib/Memcache/CasTraitTest.php
@@ -23,6 +23,9 @@ namespace Test\Memcache;
use Test\TestCase;
+/**
+ * @group Memcache
+ */
class CasTraitTest extends TestCase {
/**
* @return \OC\Memcache\CasTrait
diff --git a/tests/lib/Memcache/FactoryTest.php b/tests/lib/Memcache/FactoryTest.php
index f16f70eddc2..9cdd7058ffa 100644
--- a/tests/lib/Memcache/FactoryTest.php
+++ b/tests/lib/Memcache/FactoryTest.php
@@ -61,6 +61,9 @@ class Test_Factory_Unavailable_Cache2 extends NullCache {
}
}
+/**
+ * @group Memcache
+ */
class FactoryTest extends \Test\TestCase {
public const AVAILABLE1 = '\\Test\\Memcache\\Test_Factory_Available_Cache1';
public const AVAILABLE2 = '\\Test\\Memcache\\Test_Factory_Available_Cache2';
diff --git a/tests/lib/Memcache/MemcachedTest.php b/tests/lib/Memcache/MemcachedTest.php
index caebf50cd6b..24cf0ba7af3 100644
--- a/tests/lib/Memcache/MemcachedTest.php
+++ b/tests/lib/Memcache/MemcachedTest.php
@@ -9,6 +9,10 @@
namespace Test\Memcache;
+/**
+ * @group Memcache
+ * @group Memcached
+ */
class MemcachedTest extends Cache {
public static function setUpBeforeClass(): void {
parent::setUpBeforeClass();
diff --git a/tests/lib/Memcache/RedisTest.php b/tests/lib/Memcache/RedisTest.php
index e7bb9c29d36..276dbf3a550 100644
--- a/tests/lib/Memcache/RedisTest.php
+++ b/tests/lib/Memcache/RedisTest.php
@@ -9,6 +9,10 @@
namespace Test\Memcache;
+/**
+ * @group Memcache
+ * @group Redis
+ */
class RedisTest extends Cache {
public static function setUpBeforeClass(): void {
parent::setUpBeforeClass();
diff --git a/tests/lib/MemoryInfoTest.php b/tests/lib/MemoryInfoTest.php
index f6557eed45c..1a983f19ece 100644
--- a/tests/lib/MemoryInfoTest.php
+++ b/tests/lib/MemoryInfoTest.php
@@ -71,10 +71,10 @@ class MemoryInfoTest extends TestCase {
* Tests that getMemoryLimit works as expected.
*
* @param string $iniValue The "memory_limit" ini data.
- * @param int $expected The expected detected memory limit.
+ * @param int|float $expected The expected detected memory limit.
* @dataProvider getMemoryLimitTestData
*/
- public function testMemoryLimit($iniValue, int $expected) {
+ public function testMemoryLimit(string $iniValue, int|float $expected) {
ini_set('memory_limit', $iniValue);
$memoryInfo = new MemoryInfo();
self::assertEquals($expected, $memoryInfo->getMemoryLimit());
diff --git a/tests/lib/Route/RouterTest.php b/tests/lib/Route/RouterTest.php
index cc7eda199e2..44fef6f1d4f 100644
--- a/tests/lib/Route/RouterTest.php
+++ b/tests/lib/Route/RouterTest.php
@@ -30,12 +30,20 @@ use Test\TestCase;
/**
* Class RouterTest
*
+ * @group RoutingWeirdness
+ *
* @package Test\Route
*/
class RouterTest extends TestCase {
public function testGenerateConsecutively(): void {
/** @var LoggerInterface $logger */
$logger = $this->createMock(LoggerInterface::class);
+ $logger->method('info')
+ ->willReturnCallback(
+ function (string $message, array $data) {
+ $this->fail('Unexpected info log: '.(string)($data['exception'] ?? $message));
+ }
+ );
$router = new Router($logger);
$this->assertEquals('/index.php/apps/files/', $router->generate('files.view.index'));