Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] Fix labeled version autoExpire #3420

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/Versions/ExpireManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,15 @@
$newInterval = true;
while ($newInterval) {
if ($nextInterval === -1 || $prevTimestamp > $nextInterval) {
if ($version->getTimestamp() > $nextVersion) {

Check failure on line 90 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedClass

lib/Versions/ExpireManager.php:90:10: UndefinedClass: Class, interface or enum named OCA\GroupFolders\Versions\IMetadataVersion does not exist (see https://psalm.dev/019)

Check failure on line 90 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedDocblockClass

lib/Versions/ExpireManager.php:90:10: UndefinedDocblockClass: Docblock-defined class, interface or enum named OCA\GroupFolders\Versions\IMetadataVersion does not exist (see https://psalm.dev/200)
//distance between two version too small, mark to delete
$toDelete[] = $version;
// Do not expire versions with a label.
if (!($version instanceof IMetadataVersion) || $version->getMetadataValue('label') === null || $version->getMetadataValue('label') === '') {

Check failure on line 92 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedClass

lib/Versions/ExpireManager.php:92:33: UndefinedClass: Class, interface or enum named OCA\GroupFolders\Versions\IMetadataVersion does not exist (see https://psalm.dev/019)

Check failure on line 92 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedClass

lib/Versions/ExpireManager.php:92:54: UndefinedClass: Class, interface or enum named OCA\GroupFolders\Versions\IMetadataVersion does not exist (see https://psalm.dev/019)

Check failure on line 92 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedInterfaceMethod

lib/Versions/ExpireManager.php:92:64: UndefinedInterfaceMethod: Method (OCA\Files_Versions\Versions\IVersion&OCA\GroupFolders\Versions\IMetadataVersion)::getMetadataValue does not exist (see https://psalm.dev/181)

Check failure on line 92 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedClass

lib/Versions/ExpireManager.php:92:102: UndefinedClass: Class, interface or enum named OCA\GroupFolders\Versions\IMetadataVersion does not exist (see https://psalm.dev/019)

Check failure on line 92 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedInterfaceMethod

lib/Versions/ExpireManager.php:92:112: UndefinedInterfaceMethod: Method (OCA\Files_Versions\Versions\IVersion&OCA\GroupFolders\Versions\IMetadataVersion)::getMetadataValue does not exist (see https://psalm.dev/181)
//distance between two version too small, mark to delete
$toDelete[] = $version;
}
} else {
$nextVersion = $version->getTimestamp() - $step;

Check failure on line 97 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedClass

lib/Versions/ExpireManager.php:97:22: UndefinedClass: Class, interface or enum named OCA\GroupFolders\Versions\IMetadataVersion does not exist (see https://psalm.dev/019)
$prevTimestamp = $version->getTimestamp();

Check failure on line 98 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedClass

lib/Versions/ExpireManager.php:98:24: UndefinedClass: Class, interface or enum named OCA\GroupFolders\Versions\IMetadataVersion does not exist (see https://psalm.dev/019)
}
$newInterval = false; // version checked so we can move to the next one
} else { // time to move on to the next interval
Expand Down
Loading