From 48925c703d6e9078260ff127c1574e4984d79a36 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 28 Apr 2026 07:51:16 +0200 Subject: [PATCH] fix(events): Migrate OCP\Files\Cache events Signed-off-by: Joas Schilling --- config/nextcloud-25/nextcloud-25-deprecations.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config/nextcloud-25/nextcloud-25-deprecations.php b/config/nextcloud-25/nextcloud-25-deprecations.php index 24d6c22..1519b30 100644 --- a/config/nextcloud-25/nextcloud-25-deprecations.php +++ b/config/nextcloud-25/nextcloud-25-deprecations.php @@ -7,6 +7,7 @@ use Nextcloud\Rector\Rector\OcpUtilAddScriptRector; use Nextcloud\Rector\ValueObject\LegacyGetterToOcpServerGet; use Rector\Config\RectorConfig; +use Rector\Renaming\Rector\Name\RenameClassRector; use Rector\Renaming\Rector\StaticCall\RenameStaticMethodRector; use Rector\Renaming\ValueObject\RenameStaticMethod; @@ -207,4 +208,14 @@ new LegacyGetterToOcpServerGet('getGeneratorHelper', 'OC\Preview\GeneratorHelper'), ], ); + + $rectorConfig->ruleWithConfiguration( + RenameClassRector::class, + [ + // Deprecated since 21.0.0 + 'OCP\Files\Cache\CacheInsertEvent' => 'OCP\Files\Cache\CacheEntryInsertedEvent', + // Deprecated since 21.0.0 + 'OCP\Files\Cache\CacheUpdateEvent' => 'OCP\Files\Cache\CacheEntryUpdatedEvent', + ], + ); };