diff --git a/apps/dav/composer/composer/autoload_static.php b/apps/dav/composer/composer/autoload_static.php
index dabf046fa7ea4..25b6fcefd976d 100644
--- a/apps/dav/composer/composer/autoload_static.php
+++ b/apps/dav/composer/composer/autoload_static.php
@@ -7,14 +7,14 @@
class ComposerStaticInitDAV
{
public static $prefixLengthsPsr4 = array (
- 'O' =>
+ 'O' =>
array (
'OCA\\DAV\\' => 8,
),
);
public static $prefixDirsPsr4 = array (
- 'OCA\\DAV\\' =>
+ 'OCA\\DAV\\' =>
array (
0 => __DIR__ . '/..' . '/../lib',
),
diff --git a/apps/files_external/lib/Config/ExternalMountPoint.php b/apps/files_external/lib/Config/ExternalMountPoint.php
index 26e11446e6dac..6d116ad2fc6cb 100644
--- a/apps/files_external/lib/Config/ExternalMountPoint.php
+++ b/apps/files_external/lib/Config/ExternalMountPoint.php
@@ -9,8 +9,9 @@
use OC\Files\Mount\MountPoint;
use OCA\Files_External\Lib\Auth\Password\SessionCredentials;
use OCA\Files_External\Lib\StorageConfig;
+use OCP\Files\Mount\IExternalMountPoint;
-class ExternalMountPoint extends MountPoint {
+class ExternalMountPoint extends MountPoint implements IExternalMountPoint {
public function __construct(
protected StorageConfig $storageConfig,
diff --git a/apps/files_sharing/composer/composer/autoload_classmap.php b/apps/files_sharing/composer/composer/autoload_classmap.php
index 2d6b545a17a63..bfa20924f83f4 100644
--- a/apps/files_sharing/composer/composer/autoload_classmap.php
+++ b/apps/files_sharing/composer/composer/autoload_classmap.php
@@ -61,7 +61,6 @@
'OCA\\Files_Sharing\\External\\Watcher' => $baseDir . '/../lib/External/Watcher.php',
'OCA\\Files_Sharing\\Helper' => $baseDir . '/../lib/Helper.php',
'OCA\\Files_Sharing\\Hooks' => $baseDir . '/../lib/Hooks.php',
- 'OCA\\Files_Sharing\\ISharedMountPoint' => $baseDir . '/../lib/ISharedMountPoint.php',
'OCA\\Files_Sharing\\ISharedStorage' => $baseDir . '/../lib/ISharedStorage.php',
'OCA\\Files_Sharing\\Listener\\BeforeDirectFileDownloadListener' => $baseDir . '/../lib/Listener/BeforeDirectFileDownloadListener.php',
'OCA\\Files_Sharing\\Listener\\BeforeNodeReadListener' => $baseDir . '/../lib/Listener/BeforeNodeReadListener.php',
diff --git a/apps/files_sharing/composer/composer/autoload_static.php b/apps/files_sharing/composer/composer/autoload_static.php
index 1fc2ddd2dfd8a..2f8febd7a836e 100644
--- a/apps/files_sharing/composer/composer/autoload_static.php
+++ b/apps/files_sharing/composer/composer/autoload_static.php
@@ -76,7 +76,6 @@ class ComposerStaticInitFiles_Sharing
'OCA\\Files_Sharing\\External\\Watcher' => __DIR__ . '/..' . '/../lib/External/Watcher.php',
'OCA\\Files_Sharing\\Helper' => __DIR__ . '/..' . '/../lib/Helper.php',
'OCA\\Files_Sharing\\Hooks' => __DIR__ . '/..' . '/../lib/Hooks.php',
- 'OCA\\Files_Sharing\\ISharedMountPoint' => __DIR__ . '/..' . '/../lib/ISharedMountPoint.php',
'OCA\\Files_Sharing\\ISharedStorage' => __DIR__ . '/..' . '/../lib/ISharedStorage.php',
'OCA\\Files_Sharing\\Listener\\BeforeDirectFileDownloadListener' => __DIR__ . '/..' . '/../lib/Listener/BeforeDirectFileDownloadListener.php',
'OCA\\Files_Sharing\\Listener\\BeforeNodeReadListener' => __DIR__ . '/..' . '/../lib/Listener/BeforeNodeReadListener.php',
diff --git a/apps/files_sharing/lib/External/Mount.php b/apps/files_sharing/lib/External/Mount.php
index a83a0a25a2a18..8b94252d9af50 100644
--- a/apps/files_sharing/lib/External/Mount.php
+++ b/apps/files_sharing/lib/External/Mount.php
@@ -10,11 +10,12 @@
use OC\Files\Mount\MountPoint;
use OC\Files\Storage\Storage;
use OC\Files\Storage\StorageFactory;
-use OCA\Files_Sharing\ISharedMountPoint;
+use OCP\Files\Mount\IExternalMountPoint;
use OCP\Files\Mount\IMovableMount;
+use OCP\Files\Mount\ISharedMountPoint;
use Override;
-class Mount extends MountPoint implements IMovableMount, ISharedMountPoint {
+class Mount extends MountPoint implements IMovableMount, ISharedMountPoint, IExternalMountPoint {
public function __construct(
string|Storage $storage,
string $mountpoint,
diff --git a/apps/files_sharing/lib/SharedMount.php b/apps/files_sharing/lib/SharedMount.php
index 915a92e81f97a..8d6fdb4d4166a 100644
--- a/apps/files_sharing/lib/SharedMount.php
+++ b/apps/files_sharing/lib/SharedMount.php
@@ -14,6 +14,7 @@
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Events\InvalidateMountCacheEvent;
use OCP\Files\Mount\IMovableMount;
+use OCP\Files\Mount\ISharedMountPoint;
use OCP\Files\Storage\IStorageFactory;
use OCP\IDBConnection;
use OCP\IUser;
diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml
index 3d97d80124ced..82d21c1f27e1d 100644
--- a/build/psalm-baseline.xml
+++ b/build/psalm-baseline.xml
@@ -57,6 +57,7 @@
+
diff --git a/lib/composer/composer/LICENSE b/lib/composer/composer/LICENSE
index 62ecfd8d0046b..f27399a042d95 100644
--- a/lib/composer/composer/LICENSE
+++ b/lib/composer/composer/LICENSE
@@ -1,3 +1,4 @@
+
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -17,3 +18,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php
index 28373a5af8597..9ffa76ee2931e 100644
--- a/lib/composer/composer/autoload_classmap.php
+++ b/lib/composer/composer/autoload_classmap.php
@@ -495,10 +495,12 @@
'OCP\\Files\\Lock\\LockContext' => $baseDir . '/lib/public/Files/Lock/LockContext.php',
'OCP\\Files\\Lock\\NoLockProviderException' => $baseDir . '/lib/public/Files/Lock/NoLockProviderException.php',
'OCP\\Files\\Lock\\OwnerLockedException' => $baseDir . '/lib/public/Files/Lock/OwnerLockedException.php',
+ 'OCP\\Files\\Mount\\IExternalMountPoint' => $baseDir . '/lib/public/Files/Mount/IExternalMountPoint.php',
'OCP\\Files\\Mount\\IMountManager' => $baseDir . '/lib/public/Files/Mount/IMountManager.php',
'OCP\\Files\\Mount\\IMountPoint' => $baseDir . '/lib/public/Files/Mount/IMountPoint.php',
'OCP\\Files\\Mount\\IMovableMount' => $baseDir . '/lib/public/Files/Mount/IMovableMount.php',
'OCP\\Files\\Mount\\IShareOwnerlessMount' => $baseDir . '/lib/public/Files/Mount/IShareOwnerlessMount.php',
+ 'OCP\\Files\\Mount\\ISharedMountPoint' => $baseDir . '/lib/public/Files/Mount/ISharedMountPoint.php',
'OCP\\Files\\Mount\\ISystemMountPoint' => $baseDir . '/lib/public/Files/Mount/ISystemMountPoint.php',
'OCP\\Files\\Node' => $baseDir . '/lib/public/Files/Node.php',
'OCP\\Files\\NotEnoughSpaceException' => $baseDir . '/lib/public/Files/NotEnoughSpaceException.php',
diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php
index e28dc90763681..a431da5426d16 100644
--- a/lib/composer/composer/autoload_static.php
+++ b/lib/composer/composer/autoload_static.php
@@ -536,10 +536,12 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OCP\\Files\\Lock\\LockContext' => __DIR__ . '/../../..' . '/lib/public/Files/Lock/LockContext.php',
'OCP\\Files\\Lock\\NoLockProviderException' => __DIR__ . '/../../..' . '/lib/public/Files/Lock/NoLockProviderException.php',
'OCP\\Files\\Lock\\OwnerLockedException' => __DIR__ . '/../../..' . '/lib/public/Files/Lock/OwnerLockedException.php',
+ 'OCP\\Files\\Mount\\IExternalMountPoint' => __DIR__ . '/../../..' . '/lib/public/Files/Mount/IExternalMountPoint.php',
'OCP\\Files\\Mount\\IMountManager' => __DIR__ . '/../../..' . '/lib/public/Files/Mount/IMountManager.php',
'OCP\\Files\\Mount\\IMountPoint' => __DIR__ . '/../../..' . '/lib/public/Files/Mount/IMountPoint.php',
'OCP\\Files\\Mount\\IMovableMount' => __DIR__ . '/../../..' . '/lib/public/Files/Mount/IMovableMount.php',
'OCP\\Files\\Mount\\IShareOwnerlessMount' => __DIR__ . '/../../..' . '/lib/public/Files/Mount/IShareOwnerlessMount.php',
+ 'OCP\\Files\\Mount\\ISharedMountPoint' => __DIR__ . '/../../..' . '/lib/public/Files/Mount/ISharedMountPoint.php',
'OCP\\Files\\Mount\\ISystemMountPoint' => __DIR__ . '/../../..' . '/lib/public/Files/Mount/ISystemMountPoint.php',
'OCP\\Files\\Node' => __DIR__ . '/../../..' . '/lib/public/Files/Node.php',
'OCP\\Files\\NotEnoughSpaceException' => __DIR__ . '/../../..' . '/lib/public/Files/NotEnoughSpaceException.php',
diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php
index 65280b0f31580..d572c1c29bce1 100644
--- a/lib/private/Files/FileInfo.php
+++ b/lib/private/Files/FileInfo.php
@@ -9,10 +9,10 @@
use OC\Files\Cache\CacheEntry;
use OC\Files\Mount\HomeMountPoint;
-use OCA\Files_Sharing\ISharedMountPoint;
use OCP\Constants;
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Mount\IMountPoint;
+use OCP\Files\Mount\ISharedMountPoint;
use OCP\IUser;
/**
@@ -285,13 +285,8 @@ public function isShareable() {
return $this->checkPermissions(Constants::PERMISSION_SHARE);
}
- /**
- * Check if a file or folder is shared
- *
- * @return bool
- */
#[\Override]
- public function isShared() {
+ public function isShared(): bool {
return $this->mount instanceof ISharedMountPoint;
}
diff --git a/lib/private/Files/SetupManager.php b/lib/private/Files/SetupManager.php
index a8c46a20bd31a..9768f09fad04b 100644
--- a/lib/private/Files/SetupManager.php
+++ b/lib/private/Files/SetupManager.php
@@ -22,10 +22,6 @@
use OC\ServerNotAvailableException;
use OC\Share20\ShareDisableChecker;
use OC_Hook;
-use OCA\Files_External\Config\ExternalMountPoint;
-use OCA\Files_Sharing\External\Mount;
-use OCA\Files_Sharing\ISharedMountPoint;
-use OCA\Files_Sharing\SharedMount;
use OCP\App\IAppManager;
use OCP\Constants;
use OCP\Diagnostics\IEventLogger;
@@ -44,8 +40,10 @@
use OCP\Files\Events\Node\FilesystemTornDownEvent;
use OCP\Files\Events\UserHomeSetupEvent;
use OCP\Files\ISetupManager;
+use OCP\Files\Mount\IExternalMountPoint;
use OCP\Files\Mount\IMountManager;
use OCP\Files\Mount\IMountPoint;
+use OCP\Files\Mount\ISharedMountPoint;
use OCP\Files\NotFoundException;
use OCP\Files\Storage\IStorage;
use OCP\Group\Events\UserAddedEvent;
@@ -191,7 +189,7 @@ function ($mountPoint, IStorage $storage, IMountPoint $mount) use ($reSharingEna
// install storage availability wrapper, before most other wrappers
Filesystem::addStorageWrapper('oc_availability', function ($mountPoint, IStorage $storage, IMountPoint $mount) {
- $externalMount = $mount instanceof ExternalMountPoint || $mount instanceof Mount;
+ $externalMount = $mount instanceof IExternalMountPoint;
if ($externalMount && !$storage->isLocal()) {
return new Availability(['storage' => $storage]);
}
@@ -199,7 +197,7 @@ function ($mountPoint, IStorage $storage, IMountPoint $mount) use ($reSharingEna
});
Filesystem::addStorageWrapper('oc_encoding', function ($mountPoint, IStorage $storage, IMountPoint $mount) {
- if ($mount->getOption('encoding_compatibility', false) && !$mount instanceof SharedMount) {
+ if ($mount->getOption('encoding_compatibility', false) && !$mount instanceof ISharedMountPoint) {
return new Encoding(['storage' => $storage]);
}
return $storage;
diff --git a/lib/public/Files/Mount/IExternalMountPoint.php b/lib/public/Files/Mount/IExternalMountPoint.php
new file mode 100644
index 0000000000000..cee72cabef44a
--- /dev/null
+++ b/lib/public/Files/Mount/IExternalMountPoint.php
@@ -0,0 +1,23 @@
+