Merge pull request #60797 from nextcloud/chore/cache/remove-deprecated-events

chore(Cache): Remove deprecated insert and update events
This commit is contained in:
Kate 2026-06-01 11:36:23 +02:00 committed by GitHub
commit b839335eae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 0 additions and 43 deletions

View file

@ -417,8 +417,6 @@ return array(
'OCP\\Files\\Cache\\CacheEntryInsertedEvent' => $baseDir . '/lib/public/Files/Cache/CacheEntryInsertedEvent.php',
'OCP\\Files\\Cache\\CacheEntryRemovedEvent' => $baseDir . '/lib/public/Files/Cache/CacheEntryRemovedEvent.php',
'OCP\\Files\\Cache\\CacheEntryUpdatedEvent' => $baseDir . '/lib/public/Files/Cache/CacheEntryUpdatedEvent.php',
'OCP\\Files\\Cache\\CacheInsertEvent' => $baseDir . '/lib/public/Files/Cache/CacheInsertEvent.php',
'OCP\\Files\\Cache\\CacheUpdateEvent' => $baseDir . '/lib/public/Files/Cache/CacheUpdateEvent.php',
'OCP\\Files\\Cache\\ICache' => $baseDir . '/lib/public/Files/Cache/ICache.php',
'OCP\\Files\\Cache\\ICacheEntry' => $baseDir . '/lib/public/Files/Cache/ICacheEntry.php',
'OCP\\Files\\Cache\\ICacheEvent' => $baseDir . '/lib/public/Files/Cache/ICacheEvent.php',

View file

@ -458,8 +458,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OCP\\Files\\Cache\\CacheEntryInsertedEvent' => __DIR__ . '/../../..' . '/lib/public/Files/Cache/CacheEntryInsertedEvent.php',
'OCP\\Files\\Cache\\CacheEntryRemovedEvent' => __DIR__ . '/../../..' . '/lib/public/Files/Cache/CacheEntryRemovedEvent.php',
'OCP\\Files\\Cache\\CacheEntryUpdatedEvent' => __DIR__ . '/../../..' . '/lib/public/Files/Cache/CacheEntryUpdatedEvent.php',
'OCP\\Files\\Cache\\CacheInsertEvent' => __DIR__ . '/../../..' . '/lib/public/Files/Cache/CacheInsertEvent.php',
'OCP\\Files\\Cache\\CacheUpdateEvent' => __DIR__ . '/../../..' . '/lib/public/Files/Cache/CacheUpdateEvent.php',
'OCP\\Files\\Cache\\ICache' => __DIR__ . '/../../..' . '/lib/public/Files/Cache/ICache.php',
'OCP\\Files\\Cache\\ICacheEntry' => __DIR__ . '/../../..' . '/lib/public/Files/Cache/ICacheEntry.php',
'OCP\\Files\\Cache\\ICacheEvent' => __DIR__ . '/../../..' . '/lib/public/Files/Cache/ICacheEvent.php',

View file

@ -434,7 +434,6 @@ class Cache implements ICache {
// path can still be null if the file doesn't exist
if ($path !== null) {
$event = new CacheEntryUpdatedEvent($this->storage, $path, $id, $this->getNumericStorageId());
$this->eventDispatcher->dispatch(CacheEntryUpdatedEvent::class, $event);
$this->eventDispatcher->dispatchTyped($event);
}
}
@ -848,11 +847,9 @@ class Cache implements ICache {
$this->eventDispatcher->dispatchTyped(new CacheEntriesRemovedEvent([$event]));
$event = new CacheEntryInsertedEvent($this->storage, $targetPath, $sourceId, $this->getNumericStorageId());
$this->eventDispatcher->dispatch(CacheEntryInsertedEvent::class, $event);
$this->eventDispatcher->dispatchTyped($event);
} else {
$event = new CacheEntryUpdatedEvent($this->storage, $targetPath, $sourceId, $this->getNumericStorageId());
$this->eventDispatcher->dispatch(CacheEntryUpdatedEvent::class, $event);
$this->eventDispatcher->dispatchTyped($event);
}
} else {

View file

@ -1,18 +0,0 @@
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\Files\Cache;
/**
* Event for when a new entry gets added to the cache
*
* @since 16.0.0
* @deprecated 21.0.0 use CacheEntryInsertedEvent instead
*/
class CacheInsertEvent extends CacheEntryInsertedEvent {
}

View file

@ -1,18 +0,0 @@
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\Files\Cache;
/**
* Event for when an existing entry in the cache gets updated
*
* @since 16.0.0
* @deprecated 21.0.0 use CacheEntryUpdatedEvent instead
*/
class CacheUpdateEvent extends CacheEntryUpdatedEvent {
}