refactor(files): Rename IMountProviderArgs

It's not an interface so the I-prefix is inadequate.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
This commit is contained in:
Carl Schwan 2026-01-12 17:33:11 +01:00
parent 89166cbf9a
commit 7b05c8f797
No known key found for this signature in database
GPG key ID: 02325448204E452A
7 changed files with 18 additions and 18 deletions

View file

@ -423,11 +423,11 @@ return array(
'OCP\\Files\\Config\\ICachedMountInfo' => $baseDir . '/lib/public/Files/Config/ICachedMountInfo.php',
'OCP\\Files\\Config\\IHomeMountProvider' => $baseDir . '/lib/public/Files/Config/IHomeMountProvider.php',
'OCP\\Files\\Config\\IMountProvider' => $baseDir . '/lib/public/Files/Config/IMountProvider.php',
'OCP\\Files\\Config\\IMountProviderArgs' => $baseDir . '/lib/public/Files/Config/IMountProviderArgs.php',
'OCP\\Files\\Config\\IMountProviderCollection' => $baseDir . '/lib/public/Files/Config/IMountProviderCollection.php',
'OCP\\Files\\Config\\IPartialMountProvider' => $baseDir . '/lib/public/Files/Config/IPartialMountProvider.php',
'OCP\\Files\\Config\\IRootMountProvider' => $baseDir . '/lib/public/Files/Config/IRootMountProvider.php',
'OCP\\Files\\Config\\IUserMountCache' => $baseDir . '/lib/public/Files/Config/IUserMountCache.php',
'OCP\\Files\\Config\\MountProviderArgs' => $baseDir . '/lib/public/Files/Config/MountProviderArgs.php',
'OCP\\Files\\ConnectionLostException' => $baseDir . '/lib/public/Files/ConnectionLostException.php',
'OCP\\Files\\Conversion\\ConversionMimeProvider' => $baseDir . '/lib/public/Files/Conversion/ConversionMimeProvider.php',
'OCP\\Files\\Conversion\\IConversionManager' => $baseDir . '/lib/public/Files/Conversion/IConversionManager.php',

View file

@ -464,11 +464,11 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OCP\\Files\\Config\\ICachedMountInfo' => __DIR__ . '/../../..' . '/lib/public/Files/Config/ICachedMountInfo.php',
'OCP\\Files\\Config\\IHomeMountProvider' => __DIR__ . '/../../..' . '/lib/public/Files/Config/IHomeMountProvider.php',
'OCP\\Files\\Config\\IMountProvider' => __DIR__ . '/../../..' . '/lib/public/Files/Config/IMountProvider.php',
'OCP\\Files\\Config\\IMountProviderArgs' => __DIR__ . '/../../..' . '/lib/public/Files/Config/IMountProviderArgs.php',
'OCP\\Files\\Config\\IMountProviderCollection' => __DIR__ . '/../../..' . '/lib/public/Files/Config/IMountProviderCollection.php',
'OCP\\Files\\Config\\IPartialMountProvider' => __DIR__ . '/../../..' . '/lib/public/Files/Config/IPartialMountProvider.php',
'OCP\\Files\\Config\\IRootMountProvider' => __DIR__ . '/../../..' . '/lib/public/Files/Config/IRootMountProvider.php',
'OCP\\Files\\Config\\IUserMountCache' => __DIR__ . '/../../..' . '/lib/public/Files/Config/IUserMountCache.php',
'OCP\\Files\\Config\\MountProviderArgs' => __DIR__ . '/../../..' . '/lib/public/Files/Config/MountProviderArgs.php',
'OCP\\Files\\ConnectionLostException' => __DIR__ . '/../../..' . '/lib/public/Files/ConnectionLostException.php',
'OCP\\Files\\Conversion\\ConversionMimeProvider' => __DIR__ . '/../../..' . '/lib/public/Files/Conversion/ConversionMimeProvider.php',
'OCP\\Files\\Conversion\\IConversionManager' => __DIR__ . '/../../..' . '/lib/public/Files/Conversion/IConversionManager.php',

View file

@ -13,11 +13,11 @@ use OCA\Files_Sharing\MountProvider;
use OCP\Diagnostics\IEventLogger;
use OCP\Files\Config\IHomeMountProvider;
use OCP\Files\Config\IMountProvider;
use OCP\Files\Config\IMountProviderArgs;
use OCP\Files\Config\IMountProviderCollection;
use OCP\Files\Config\IPartialMountProvider;
use OCP\Files\Config\IRootMountProvider;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\Config\MountProviderArgs;
use OCP\Files\Mount\IMountManager;
use OCP\Files\Mount\IMountPoint;
use OCP\Files\Storage\IStorageFactory;
@ -84,7 +84,7 @@ class MountProviderCollection implements IMountProviderCollection, Emitter {
}
/**
* @param IMountProviderArgs[] $mountProviderArgs
* @param MountProviderArgs[] $mountProviderArgs
* @return array<string, IMountPoint> IMountPoint array indexed by mount
* point.
*/

View file

@ -34,10 +34,10 @@ use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Config\ICachedMountInfo;
use OCP\Files\Config\IHomeMountProvider;
use OCP\Files\Config\IMountProvider;
use OCP\Files\Config\IMountProviderArgs;
use OCP\Files\Config\IPartialMountProvider;
use OCP\Files\Config\IRootMountProvider;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\Config\MountProviderArgs;
use OCP\Files\Events\BeforeFileSystemSetupEvent;
use OCP\Files\Events\InvalidateMountCacheEvent;
use OCP\Files\Events\Node\BeforeNodeRenamedEvent;
@ -482,7 +482,7 @@ class SetupManager {
if (is_a($mountProvider, IPartialMountProvider::class, true)) {
$rootId = $cachedMount->getRootId();
$rootMetadata = $this->fileAccess->getByFileId($rootId);
$providerArgs = new IMountProviderArgs($cachedMount, $rootMetadata);
$providerArgs = new MountProviderArgs($cachedMount, $rootMetadata);
// mark the path as cached (without children for now...)
$this->setupMountProviderPaths[$mountPoint] = self::SETUP_WITHOUT_CHILDREN;
$authoritativeMounts[] = array_values(
@ -568,7 +568,7 @@ class SetupManager {
$rootMetadata = $rootsMetadata[$info->getRootId()] ?? null;
return $rootMetadata
? new IMountProviderArgs($info, $rootMetadata)
? new MountProviderArgs($info, $rootMetadata)
: null;
},
$cachedMounts

View file

@ -26,12 +26,12 @@ interface IPartialMountProvider extends IMountProvider {
* as well as information about mount points known to be provided by the
* mount provider and contained in the path or in its sub-paths.
*
* Implementations should verify the IMountProviderArgs and return the
* Implementations should verify the MountProviderArgs and return the
* corresponding IMountPoint instances.
*
* @param string $path path for which the mounts are set up
* @param bool $forChildren when true, only child mounts for path should be returned
* @param IMountProviderArgs[] $mountProviderArgs
* @param MountProviderArgs[] $mountProviderArgs
* @param IStorageFactory $loader
* @return array<string, IMountPoint> IMountPoint instances, indexed by
* mount-point

View file

@ -15,10 +15,10 @@ use OCP\Files\Cache\ICacheEntry;
*
* @since 33.0.0
*/
class IMountProviderArgs {
class MountProviderArgs {
public function __construct(
public ICachedMountInfo $mountInfo,
public ICacheEntry $cacheEntry,
public readonly ICachedMountInfo $mountInfo,
public readonly ICacheEntry $cacheEntry,
) {
}
}

View file

@ -17,9 +17,9 @@ use OCP\Diagnostics\IEventLogger;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Config\ICachedMountInfo;
use OCP\Files\Config\IMountProvider;
use OCP\Files\Config\IMountProviderArgs;
use OCP\Files\Config\IPartialMountProvider;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\Config\MountProviderArgs;
use OCP\Files\Mount\IMountManager;
use OCP\Files\Mount\IMountPoint;
use OCP\Files\Storage\IStorageFactory;
@ -147,7 +147,7 @@ class SetupManagerTest extends TestCase {
false,
$this->callback(function (array $args) use ($cachedMount) {
$this->assertCount(1, $args);
$this->assertInstanceOf(IMountProviderArgs::class, $args[0]);
$this->assertInstanceOf(MountProviderArgs::class, $args[0]);
$this->assertSame($cachedMount, $args[0]->mountInfo);
return true;
})
@ -366,7 +366,7 @@ class SetupManagerTest extends TestCase {
$this->assertSame($expectedPath, $pathArg);
$this->assertSame($expectedForChildren, $forChildren);
$this->assertCount(1, $mountProviderArgs);
$this->assertInstanceOf(IMountProviderArgs::class, $mountProviderArgs[0]);
$this->assertInstanceOf(MountProviderArgs::class, $mountProviderArgs[0]);
$this->assertSame($expectedCachedMount, $mountProviderArgs[0]->mountInfo);
return $mountPoints;
@ -468,7 +468,7 @@ class SetupManagerTest extends TestCase {
$this->assertSame($expectedPath, $pathArg);
$this->assertSame($expectedForChildren, $forChildren);
$this->assertCount(1, $mountProviderArgs);
$this->assertInstanceOf(IMountProviderArgs::class, $mountProviderArgs[0]);
$this->assertInstanceOf(MountProviderArgs::class, $mountProviderArgs[0]);
$this->assertSame($expectedCachedMount, $mountProviderArgs[0]->mountInfo);
return $mountPoints;
@ -520,7 +520,7 @@ class SetupManagerTest extends TestCase {
false,
$this->callback(function (array $args) use ($cachedMount) {
$this->assertCount(1, $args);
$this->assertInstanceOf(IMountProviderArgs::class,
$this->assertInstanceOf(MountProviderArgs::class,
$args[0]);
$this->assertSame($cachedMount, $args[0]->mountInfo);
return true;
@ -589,7 +589,7 @@ class SetupManagerTest extends TestCase {
false,
$this->callback(function (array $args) use ($cachedMount) {
$this->assertCount(1, $args);
$this->assertInstanceOf(IMountProviderArgs::class,
$this->assertInstanceOf(MountProviderArgs::class,
$args[0]);
$this->assertSame($cachedMount, $args[0]->mountInfo);
return true;