diff --git a/apps/files_external/lib/Config/ConfigAdapter.php b/apps/files_external/lib/Config/ConfigAdapter.php index 1b83688418c74..2adc9234b6b17 100644 --- a/apps/files_external/lib/Config/ConfigAdapter.php +++ b/apps/files_external/lib/Config/ConfigAdapter.php @@ -36,12 +36,12 @@ use OCA\Files_External\Lib\StorageConfig; use OCA\Files_External\Service\UserGlobalStoragesService; use OCA\Files_External\Service\UserStoragesService; +use OCP\AppFramework\Utility\ITimeFactory; use OCP\Files\Config\IMountProvider; use OCP\Files\Storage; use OCP\Files\Storage\IStorageFactory; use OCP\Files\StorageNotAvailableException; use OCP\IUser; -use Psr\Clock\ClockInterface; /** * Make the old files_external config work with the new public mount config api @@ -50,7 +50,7 @@ class ConfigAdapter implements IMountProvider { public function __construct( private UserStoragesService $userStoragesService, private UserGlobalStoragesService $userGlobalStoragesService, - private ClockInterface $clock, + private ITimeFactory $clock, ) {} /** diff --git a/lib/private/Files/Storage/Wrapper/KnownMtime.php b/lib/private/Files/Storage/Wrapper/KnownMtime.php index dde209c44ab45..492744954fa7b 100644 --- a/lib/private/Files/Storage/Wrapper/KnownMtime.php +++ b/lib/private/Files/Storage/Wrapper/KnownMtime.php @@ -2,9 +2,9 @@ namespace OC\Files\Storage\Wrapper; +use OCP\AppFramework\Utility\ITimeFactory; use OCP\Cache\CappedMemoryCache; use OCP\Files\Storage\IStorage; -use Psr\Clock\ClockInterface; /** * Wrapper that overwrites the mtime return by stat/getMetaData if the returned value @@ -14,7 +14,7 @@ */ class KnownMtime extends Wrapper { private CappedMemoryCache $knowMtimes; - private ClockInterface $clock; + private ITimeFactory $clock; public function __construct($arguments) { parent::__construct($arguments); diff --git a/tests/lib/Files/Storage/Wrapper/KnownMtimeTest.php b/tests/lib/Files/Storage/Wrapper/KnownMtimeTest.php index 0a1691f9e704a..08fbf4691ff0d 100644 --- a/tests/lib/Files/Storage/Wrapper/KnownMtimeTest.php +++ b/tests/lib/Files/Storage/Wrapper/KnownMtimeTest.php @@ -10,8 +10,8 @@ use OC\Files\Storage\Temporary; use OC\Files\Storage\Wrapper\KnownMtime; +use OCP\AppFramework\Utility\ITimeFactory; use PHPUnit\Framework\MockObject\MockObject; -use Psr\Clock\ClockInterface; use Test\Files\Storage\Storage; /** @@ -21,7 +21,7 @@ class KnownMtimeTest extends Storage { /** @var Temporary */ private $sourceStorage; - /** @var ClockInterface|MockObject */ + /** @var ITimeFactory|MockObject */ private $clock; private int $fakeTime = 0; @@ -29,7 +29,7 @@ protected function setUp(): void { parent::setUp(); $this->fakeTime = 0; $this->sourceStorage = new Temporary([]); - $this->clock = $this->createMock(ClockInterface::class); + $this->clock = $this->createMock(ITimeFactory::class); $this->clock->method('now')->willReturnCallback(function () { if ($this->fakeTime) { return new \DateTimeImmutable("@{$this->fakeTime}");