From beef35d64e53ae78ca669e74b133b89ddec88004 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Mon, 27 Apr 2026 17:39:39 +0200 Subject: [PATCH 1/3] fix(since): Import PhpParser classes Signed-off-by: Daniel Kesselberg --- build/psalm/OcpSinceChecker.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/psalm/OcpSinceChecker.php b/build/psalm/OcpSinceChecker.php index c4e8f717828..864f47070c2 100644 --- a/build/psalm/OcpSinceChecker.php +++ b/build/psalm/OcpSinceChecker.php @@ -1,12 +1,17 @@ stmts as $stmt) { if ($stmt instanceof ClassConst) { self::checkStatementComment($stmt, $statementsSource, 'constant'); From b323ea9994904ede00dc99a0fb4753c3ac94c938 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Mon, 27 Apr 2026 17:40:30 +0200 Subject: [PATCH 2/3] fix(since): Ignore private methods in OCP fix(since): Ignore private methods in OCP Signed-off-by: Daniel Kesselberg [skip ci] --- build/psalm/OcpSinceChecker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/psalm/OcpSinceChecker.php b/build/psalm/OcpSinceChecker.php index 864f47070c2..9323b07feb7 100644 --- a/build/psalm/OcpSinceChecker.php +++ b/build/psalm/OcpSinceChecker.php @@ -44,7 +44,7 @@ class OcpSinceChecker implements Psalm\Plugin\EventHandler\AfterClassLikeVisitIn self::checkStatementComment($stmt, $statementsSource, 'constant'); } - if ($stmt instanceof ClassMethod) { + if ($stmt instanceof ClassMethod && ($stmt->isPublic() || $stmt->isProtected())) { self::checkStatementComment($stmt, $statementsSource, 'method'); } From 0e99f8c4970b2e328040d0bd28b98c317d2f820a Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Mon, 27 Apr 2026 17:57:32 +0200 Subject: [PATCH 3/3] docs(ocp): Add since tag Signed-off-by: Daniel Kesselberg --- build/psalm-baseline.xml | 11 +++++- lib/public/AppFramework/Attribute/ASince.php | 4 ++ .../Attribute/ExceptionalImplementable.php | 9 +++++ lib/public/AppFramework/Controller.php | 3 ++ .../AppFramework/Db/SnowflakeAwareEntity.php | 10 +++++ .../Http/Attribute/RequestHeader.php | 1 + .../AppFramework/PublicShareController.php | 7 ++++ lib/public/BackgroundJob/Job.php | 30 ++++++++++++++ lib/public/Calendar/CalendarExportOptions.php | 10 +++++ lib/public/Calendar/CalendarImportOptions.php | 34 ++++++++++++++++ lib/public/Comments/CommentsEvent.php | 2 +- .../Events/BeforeCommentUpdatedEvent.php | 2 + .../Comments/Events/CommentAddedEvent.php | 2 + .../Comments/Events/CommentDeletedEvent.php | 2 + .../Comments/Events/CommentUpdatedEvent.php | 2 + .../Events/ContentProviderRegisterEvent.php | 3 ++ .../ContextChat/Type/UpdateAccessOp.php | 6 +++ .../QueryBuilder/ConflictResolutionMode.php | 6 ++- lib/public/DB/QueryBuilder/IQueryBuilder.php | 2 +- .../Config/Event/UserMountAddedEvent.php | 3 ++ .../Config/Event/UserMountRemovedEvent.php | 3 ++ .../Config/Event/UserMountUpdatedEvent.php | 3 ++ .../Files/Config/IPartialMountProvider.php | 1 + lib/public/Files/Config/MountProviderArgs.php | 3 ++ .../Conversion/ConversionMimeProvider.php | 12 ++++++ .../Events/BeforeRemotePropfindEvent.php | 3 ++ .../ObjectStore/Events/BucketCreatedEvent.php | 15 +++++++ lib/public/Files/Template/FieldType.php | 15 +++++++ lib/public/OCM/Enum/ParamType.php | 12 ++++++ lib/public/OpenMetrics/Metric.php | 6 +++ lib/public/OpenMetrics/MetricType.php | 24 ++++++++++++ lib/public/OpenMetrics/MetricValue.php | 9 +++++ lib/public/Snowflake/Snowflake.php | 11 ++++++ lib/public/TaskProcessing/EShapeType.php | 39 +++++++++++++++++++ .../ContextAgentAudioInteraction.php | 3 ++ .../TaskTypes/ContextAgentInteraction.php | 3 ++ .../TaskTypes/TextToTextChangeTone.php | 3 ++ .../TaskTypes/TextToTextChatWithTools.php | 3 ++ lib/public/Template/ITemplate.php | 1 + 39 files changed, 314 insertions(+), 4 deletions(-) diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index 5f07f18a705..9ab194db69d 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -44,6 +44,9 @@ + + + @@ -52,6 +55,9 @@ + + + @@ -63,6 +69,10 @@ + + + + @@ -2222,7 +2232,6 @@ - diff --git a/lib/public/AppFramework/Attribute/ASince.php b/lib/public/AppFramework/Attribute/ASince.php index 1e0c45348cf..3f5953a78c9 100644 --- a/lib/public/AppFramework/Attribute/ASince.php +++ b/lib/public/AppFramework/Attribute/ASince.php @@ -22,12 +22,16 @@ abstract class ASince { * @param string $since For shipped apps and server code such as core/ and lib/, * this should be the server version. For other apps it * should be the semantic app version. + * @since 32.0.0 */ public function __construct( protected string $since, ) { } + /** + * @since 32.0.0 + */ public function getSince(): string { return $this->since; } diff --git a/lib/public/AppFramework/Attribute/ExceptionalImplementable.php b/lib/public/AppFramework/Attribute/ExceptionalImplementable.php index 23e9f830d9b..04905a397d4 100644 --- a/lib/public/AppFramework/Attribute/ExceptionalImplementable.php +++ b/lib/public/AppFramework/Attribute/ExceptionalImplementable.php @@ -22,16 +22,25 @@ use Attribute; #[Consumable(since: '32.0.0')] #[Implementable(since: '32.0.0')] class ExceptionalImplementable { + /** + * @since 32.0.0 + */ public function __construct( protected string $app, protected ?string $class = null, ) { } + /** + * @since 32.0.0 + */ public function getApp(): string { return $this->app; } + /** + * @since 32.0.0 + */ public function getClass(): ?string { return $this->class; } diff --git a/lib/public/AppFramework/Controller.php b/lib/public/AppFramework/Controller.php index a4c0ae49ddb..d4f26bef007 100644 --- a/lib/public/AppFramework/Controller.php +++ b/lib/public/AppFramework/Controller.php @@ -141,6 +141,9 @@ abstract class Controller { . $format . '!'); } + /** + * @since 33.0.0 + */ public function isResponderRegistered(string $responder): bool { return isset($this->responders[$responder]); } diff --git a/lib/public/AppFramework/Db/SnowflakeAwareEntity.php b/lib/public/AppFramework/Db/SnowflakeAwareEntity.php index 87c91e995b8..1085927fffe 100644 --- a/lib/public/AppFramework/Db/SnowflakeAwareEntity.php +++ b/lib/public/AppFramework/Db/SnowflakeAwareEntity.php @@ -26,12 +26,16 @@ abstract class SnowflakeAwareEntity extends Entity { /** @psalm-param $_fieldTypes array */ protected array $_fieldTypes = ['id' => Types::STRING]; + /** + * @since 33.0.0 + */ public function setId($id): void { throw new \LogicException('Use generated id to set a new id to the Snowflake aware entity.'); } /** * Automatically creates a snowflake ID + * @since 33.0.0 */ public function generateId(): void { if ($this->id === null) { @@ -41,10 +45,16 @@ abstract class SnowflakeAwareEntity extends Entity { } } + /** + * @since 33.0.0 + */ public function getCreatedAt(): ?\DateTimeImmutable { return $this->getSnowflake()?->getCreatedAt(); } + /** + * @since 33.0.0 + */ public function getSnowflake(): ?Snowflake { if ($this->id === null) { return null; diff --git a/lib/public/AppFramework/Http/Attribute/RequestHeader.php b/lib/public/AppFramework/Http/Attribute/RequestHeader.php index 1d0fbbfa0c3..0f8e9035cce 100644 --- a/lib/public/AppFramework/Http/Attribute/RequestHeader.php +++ b/lib/public/AppFramework/Http/Attribute/RequestHeader.php @@ -24,6 +24,7 @@ class RequestHeader { * @param lowercase-string $name The name of the request header * @param non-empty-string $description The description of the request header * @param bool $indirect Allow indirect usage of the header for example in a middleware. Enabling this turns off the check which ensures that the header must be referenced in the controller method. + * @since 32.0.0 */ public function __construct( protected string $name, diff --git a/lib/public/AppFramework/PublicShareController.php b/lib/public/AppFramework/PublicShareController.php index 9bab261d7bd..feb4ca53a38 100644 --- a/lib/public/AppFramework/PublicShareController.php +++ b/lib/public/AppFramework/PublicShareController.php @@ -26,6 +26,9 @@ use OCP\ISession; */ abstract class PublicShareController extends Controller { + /** + * @since 33.0.0 + */ public const DAV_AUTHENTICATED_FRONTEND = 'public_link_authenticated_frontend'; /** @var string */ @@ -118,6 +121,8 @@ abstract class PublicShareController extends Controller { /** * Validate the token and password hash stored in session + * + * @since 33.0.0 */ protected function validateTokenSession(string $token, string $passwordHash): bool { $allowedTokensJSON = $this->session->get(self::DAV_AUTHENTICATED_FRONTEND) ?? '[]'; @@ -131,6 +136,8 @@ abstract class PublicShareController extends Controller { /** * Store the token and password hash in session + * + * @since 33.0.0 */ protected function storeTokenSession(string $token, string $passwordHash = ''): void { $allowedTokensJSON = $this->session->get(self::DAV_AUTHENTICATED_FRONTEND) ?? '[]'; diff --git a/lib/public/BackgroundJob/Job.php b/lib/public/BackgroundJob/Job.php index 2d552383621..dbf3dda866d 100644 --- a/lib/public/BackgroundJob/Job.php +++ b/lib/public/BackgroundJob/Job.php @@ -35,6 +35,9 @@ abstract class Job implements IJob, IParallelAwareJob { ) { } + /** + * @since 25.0.0 + */ #[Override] public function start(IJobList $jobList): void { $jobList->setLastRun($this); @@ -59,45 +62,72 @@ abstract class Job implements IJob, IParallelAwareJob { } } + /** + * @since 15.0.0 + */ #[Override] final public function setId(string $id): void { $this->id = $id; } + /** + * @since 15.0.0 + */ #[Override] final public function setLastRun(int $lastRun): void { $this->lastRun = $lastRun; } + /** + * @since 15.0.0 + */ #[Override] public function setArgument(mixed $argument): void { $this->argument = $argument; } + /** + * @since 15.0.0 + */ #[Override] final public function getId(): string { return $this->id; } + /** + * @since 15.0.0 + */ #[Override] final public function getLastRun(): int { return $this->lastRun; } + /** + * @since 15.0.0 + */ #[Override] public function getArgument(): mixed { return $this->argument; } + /** + * @since 25.0.0 + */ #[Override] public function setAllowParallelRuns(bool $allow): void { $this->allowParallelRuns = $allow; } + /** + * @since 25.0.0 + */ #[Override] public function getAllowParallelRuns(): bool { return $this->allowParallelRuns; } + /** + * @since 15.0.0 + */ abstract protected function run($argument); } diff --git a/lib/public/Calendar/CalendarExportOptions.php b/lib/public/Calendar/CalendarExportOptions.php index bf21dd85ae4..a7778f57852 100644 --- a/lib/public/Calendar/CalendarExportOptions.php +++ b/lib/public/Calendar/CalendarExportOptions.php @@ -24,6 +24,7 @@ final class CalendarExportOptions { * Gets the export format * * @return 'ical'|'jcal'|'xcal' (defaults to ical) + * @since 32.0.0 */ public function getFormat(): string { return $this->format; @@ -33,6 +34,7 @@ final class CalendarExportOptions { * Sets the export format * * @param 'ical'|'jcal'|'xcal' $format + * @since 32.0.0 */ public function setFormat(string $format): void { $this->format = $format; @@ -40,6 +42,8 @@ final class CalendarExportOptions { /** * Gets the start of the range to export + * + * @since 32.0.0 */ public function getRangeStart(): ?string { return $this->rangeStart; @@ -47,6 +51,8 @@ final class CalendarExportOptions { /** * Sets the start of the range to export + * + * @since 32.0.0 */ public function setRangeStart(?string $rangeStart): void { $this->rangeStart = $rangeStart; @@ -54,6 +60,8 @@ final class CalendarExportOptions { /** * Gets the number of objects to export + * + * @since 32.0.0 */ public function getRangeCount(): ?int { return $this->rangeCount; @@ -61,6 +69,8 @@ final class CalendarExportOptions { /** * Sets the number of objects to export + * + * @since 32.0.0 */ public function setRangeCount(?int $rangeCount): void { $this->rangeCount = $rangeCount; diff --git a/lib/public/Calendar/CalendarImportOptions.php b/lib/public/Calendar/CalendarImportOptions.php index 2bdddfd50b3..f5f330a4254 100644 --- a/lib/public/Calendar/CalendarImportOptions.php +++ b/lib/public/Calendar/CalendarImportOptions.php @@ -16,18 +16,42 @@ use InvalidArgumentException; */ final class CalendarImportOptions { + /** + * @since 32.0.0 + */ public const FORMATS = ['ical', 'jcal', 'xcal']; + /** + * @since 32.0.0 + */ public const VALIDATE_NONE = 0; + /** + * @since 32.0.0 + */ public const VALIDATE_SKIP = 1; + /** + * @since 32.0.0 + */ public const VALIDATE_FAIL = 2; + /** + * @since 32.0.0 + */ public const VALIDATE_OPTIONS = [ self::VALIDATE_NONE, self::VALIDATE_SKIP, self::VALIDATE_FAIL, ]; + /** + * @since 32.0.0 + */ public const ERROR_CONTINUE = 0; + /** + * @since 32.0.0 + */ public const ERROR_FAIL = 1; + /** + * @since 32.0.0 + */ public const ERROR_OPTIONS = [ self::ERROR_CONTINUE, self::ERROR_FAIL, @@ -43,6 +67,7 @@ final class CalendarImportOptions { * Gets the import format * * @return 'ical'|'jcal'|'xcal' (defaults to ical) + * @since 32.0.0 */ public function getFormat(): string { return $this->format; @@ -52,6 +77,7 @@ final class CalendarImportOptions { * Sets the import format * * @param 'ical'|'jcal'|'xcal' $value + * @since 32.0.0 */ public function setFormat(string $value): void { if (!in_array($value, self::FORMATS, true)) { @@ -62,6 +88,8 @@ final class CalendarImportOptions { /** * Gets whether to supersede existing objects + * + * @since 32.0.0 */ public function getSupersede(): bool { return $this->supersede; @@ -69,6 +97,8 @@ final class CalendarImportOptions { /** * Sets whether to supersede existing objects + * + * @since 32.0.0 */ public function setSupersede(bool $supersede): void { $this->supersede = $supersede; @@ -78,6 +108,7 @@ final class CalendarImportOptions { * Gets how to handle object errors * * @return int 0 - continue, 1 - fail + * @since 32.0.0 */ public function getErrors(): int { return $this->errors; @@ -89,6 +120,7 @@ final class CalendarImportOptions { * @param int $value 0 - continue, 1 - fail * * @template $value of self::ERROR_* + * @since 32.0.0 */ public function setErrors(int $value): void { if (!in_array($value, CalendarImportOptions::ERROR_OPTIONS, true)) { @@ -101,6 +133,7 @@ final class CalendarImportOptions { * Gets how to handle object validation * * @return int 0 - no validation, 1 - validate and skip on issue, 2 - validate and fail on issue + * @since 32.0.0 */ public function getValidate(): int { return $this->validate; @@ -112,6 +145,7 @@ final class CalendarImportOptions { * @param int $value 0 - no validation, 1 - validate and skip on issue, 2 - validate and fail on issue * * @template $value of self::VALIDATE_* + * @since 32.0.0 */ public function setValidate(int $value): void { if (!in_array($value, CalendarImportOptions::VALIDATE_OPTIONS, true)) { diff --git a/lib/public/Comments/CommentsEvent.php b/lib/public/Comments/CommentsEvent.php index deaeb4b4009..46e6ad202ac 100644 --- a/lib/public/Comments/CommentsEvent.php +++ b/lib/public/Comments/CommentsEvent.php @@ -57,7 +57,7 @@ class CommentsEvent extends Event { /** * @since 9.0.0 - * @depreacted Since 33.0.0 use instanceof CommentAddedEvent, CommentRemovedEvent, CommentUpdatedEvent or BeforeCommentUpdatedEvent instead. + * @deprecated 33.0.0 Use instanceof CommentAddedEvent, CommentRemovedEvent, CommentUpdatedEvent or BeforeCommentUpdatedEvent instead. */ public function getEvent(): string { return $this->event; diff --git a/lib/public/Comments/Events/BeforeCommentUpdatedEvent.php b/lib/public/Comments/Events/BeforeCommentUpdatedEvent.php index c8b0b172c8a..15df999a427 100644 --- a/lib/public/Comments/Events/BeforeCommentUpdatedEvent.php +++ b/lib/public/Comments/Events/BeforeCommentUpdatedEvent.php @@ -20,6 +20,8 @@ use OCP\Comments\IComment; final class BeforeCommentUpdatedEvent extends CommentsEvent { /** * CommentEvent constructor. + * + * @since 33.0.0 */ public function __construct(IComment $comment) { /** @psalm-suppress DeprecatedConstant */ diff --git a/lib/public/Comments/Events/CommentAddedEvent.php b/lib/public/Comments/Events/CommentAddedEvent.php index db4d22689e7..3323b46a93e 100644 --- a/lib/public/Comments/Events/CommentAddedEvent.php +++ b/lib/public/Comments/Events/CommentAddedEvent.php @@ -20,6 +20,8 @@ use OCP\Comments\IComment; final class CommentAddedEvent extends CommentsEvent { /** * CommentAddedEvent constructor. + * + * @since 33.0.0 */ public function __construct(IComment $comment) { /** @psalm-suppress DeprecatedConstant */ diff --git a/lib/public/Comments/Events/CommentDeletedEvent.php b/lib/public/Comments/Events/CommentDeletedEvent.php index 6178d70237c..b2f146ce50f 100644 --- a/lib/public/Comments/Events/CommentDeletedEvent.php +++ b/lib/public/Comments/Events/CommentDeletedEvent.php @@ -20,6 +20,8 @@ use OCP\Comments\IComment; final class CommentDeletedEvent extends CommentsEvent { /** * CommentRemovedEvent constructor. + * + * @since 33.0.0 */ public function __construct(IComment $comment) { /** @psalm-suppress DeprecatedConstant */ diff --git a/lib/public/Comments/Events/CommentUpdatedEvent.php b/lib/public/Comments/Events/CommentUpdatedEvent.php index b029ce702a1..23d21500ecb 100644 --- a/lib/public/Comments/Events/CommentUpdatedEvent.php +++ b/lib/public/Comments/Events/CommentUpdatedEvent.php @@ -20,6 +20,8 @@ use OCP\Comments\IComment; final class CommentUpdatedEvent extends CommentsEvent { /** * CommentUpdatedEvent constructor. + * + * @since 33.0.0 */ public function __construct(IComment $comment) { /** @psalm-suppress DeprecatedConstant */ diff --git a/lib/public/ContextChat/Events/ContentProviderRegisterEvent.php b/lib/public/ContextChat/Events/ContentProviderRegisterEvent.php index 32a542a0dbf..48e8c2e3ae9 100644 --- a/lib/public/ContextChat/Events/ContentProviderRegisterEvent.php +++ b/lib/public/ContextChat/Events/ContentProviderRegisterEvent.php @@ -17,6 +17,9 @@ use OCP\EventDispatcher\Event; * @since 32.0.0 */ class ContentProviderRegisterEvent extends Event { + /** + * @since 32.0.0 + */ public function __construct( private IContentManager $contentManager, ) { diff --git a/lib/public/ContextChat/Type/UpdateAccessOp.php b/lib/public/ContextChat/Type/UpdateAccessOp.php index 65100d1ce83..21a4185b392 100644 --- a/lib/public/ContextChat/Type/UpdateAccessOp.php +++ b/lib/public/ContextChat/Type/UpdateAccessOp.php @@ -13,6 +13,12 @@ namespace OCP\ContextChat\Type; * @since 32.0.0 */ class UpdateAccessOp { + /** + * @since 32.0.0 + */ public const ALLOW = 'allow'; + /** + * @since 32.0.0 + */ public const DENY = 'deny'; } diff --git a/lib/public/DB/QueryBuilder/ConflictResolutionMode.php b/lib/public/DB/QueryBuilder/ConflictResolutionMode.php index 56a59b39099..046a9b089eb 100644 --- a/lib/public/DB/QueryBuilder/ConflictResolutionMode.php +++ b/lib/public/DB/QueryBuilder/ConflictResolutionMode.php @@ -12,15 +12,19 @@ namespace OCP\DB\QueryBuilder; /** * Conflict resolution mode for "FOR UPDATE" select queries. * - * @since 34.0.0 + * @since 33.0.0 */ enum ConflictResolutionMode { /** * Wait for the row to be unlocked. + * + * @since 33.0.0 */ case Ordinary; /** * Skip the row if it is locked. + * + * @since 33.0.0 */ case SkipLocked; } diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php index 4e1040f83a6..4597910ac2f 100644 --- a/lib/public/DB/QueryBuilder/IQueryBuilder.php +++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php @@ -1097,7 +1097,7 @@ interface IQueryBuilder { * Locks the queried rows for a subsequent update. * * @return $this - * @since 34.0.0 + * @since 33.0.0 */ public function forUpdate(ConflictResolutionMode $conflictResolutionMode = ConflictResolutionMode::Ordinary): self; } diff --git a/lib/public/Files/Config/Event/UserMountAddedEvent.php b/lib/public/Files/Config/Event/UserMountAddedEvent.php index 8abd7512188..d0ee2c22532 100644 --- a/lib/public/Files/Config/Event/UserMountAddedEvent.php +++ b/lib/public/Files/Config/Event/UserMountAddedEvent.php @@ -18,6 +18,9 @@ use OCP\Files\Config\ICachedMountInfo; * @since 32.0.0 */ class UserMountAddedEvent extends Event { + /** + * @since 32.0.0 + */ public function __construct( public readonly ICachedMountInfo $mountPoint, ) { diff --git a/lib/public/Files/Config/Event/UserMountRemovedEvent.php b/lib/public/Files/Config/Event/UserMountRemovedEvent.php index 0de7cfc4a99..b1094a05303 100644 --- a/lib/public/Files/Config/Event/UserMountRemovedEvent.php +++ b/lib/public/Files/Config/Event/UserMountRemovedEvent.php @@ -18,6 +18,9 @@ use OCP\Files\Config\ICachedMountInfo; * @since 32.0.0 */ class UserMountRemovedEvent extends Event { + /** + * @since 32.0.0 + */ public function __construct( public readonly ICachedMountInfo $mountPoint, ) { diff --git a/lib/public/Files/Config/Event/UserMountUpdatedEvent.php b/lib/public/Files/Config/Event/UserMountUpdatedEvent.php index f797bef134e..15f37e4e5d9 100644 --- a/lib/public/Files/Config/Event/UserMountUpdatedEvent.php +++ b/lib/public/Files/Config/Event/UserMountUpdatedEvent.php @@ -18,6 +18,9 @@ use OCP\Files\Config\ICachedMountInfo; * @since 32.0.0 */ class UserMountUpdatedEvent extends Event { + /** + * @since 32.0.0 + */ public function __construct( public readonly ICachedMountInfo $oldMountPoint, public readonly ICachedMountInfo $newMountPoint, diff --git a/lib/public/Files/Config/IPartialMountProvider.php b/lib/public/Files/Config/IPartialMountProvider.php index bac962d60dd..0b603e500ba 100644 --- a/lib/public/Files/Config/IPartialMountProvider.php +++ b/lib/public/Files/Config/IPartialMountProvider.php @@ -50,6 +50,7 @@ interface IPartialMountProvider extends IMountProvider { * in the scope of the setup request. * @param IStorageFactory $loader * @return array IMountPoint instances, indexed by mount-point + * @since 33.0.0 */ public function getMountsForPath( string $setupPathHint, diff --git a/lib/public/Files/Config/MountProviderArgs.php b/lib/public/Files/Config/MountProviderArgs.php index bc44603dcb9..73eefd52841 100644 --- a/lib/public/Files/Config/MountProviderArgs.php +++ b/lib/public/Files/Config/MountProviderArgs.php @@ -16,6 +16,9 @@ use OCP\Files\Cache\ICacheEntry; * @since 33.0.0 */ class MountProviderArgs { + /** + * @since 33.0.0 + */ public function __construct( public readonly ICachedMountInfo $mountInfo, public readonly ICacheEntry $cacheEntry, diff --git a/lib/public/Files/Conversion/ConversionMimeProvider.php b/lib/public/Files/Conversion/ConversionMimeProvider.php index 0daf4a10648..89d0372e664 100644 --- a/lib/public/Files/Conversion/ConversionMimeProvider.php +++ b/lib/public/Files/Conversion/ConversionMimeProvider.php @@ -34,18 +34,30 @@ class ConversionMimeProvider implements JsonSerializable { ) { } + /** + * @since 31.0.0 + */ public function getFrom(): string { return $this->from; } + /** + * @since 31.0.0 + */ public function getTo(): string { return $this->to; } + /** + * @since 31.0.0 + */ public function getExtension(): string { return $this->extension; } + /** + * @since 31.0.0 + */ public function getDisplayName(): string { return $this->displayName; } diff --git a/lib/public/Files/Events/BeforeRemotePropfindEvent.php b/lib/public/Files/Events/BeforeRemotePropfindEvent.php index ee9e728a979..396b8e94360 100644 --- a/lib/public/Files/Events/BeforeRemotePropfindEvent.php +++ b/lib/public/Files/Events/BeforeRemotePropfindEvent.php @@ -18,6 +18,9 @@ use OCP\EventDispatcher\Event; * @since 33.0.0 */ class BeforeRemotePropfindEvent extends Event { + /** + * @since 33.0.0 + */ public function __construct( private array $properties, ) { diff --git a/lib/public/Files/ObjectStore/Events/BucketCreatedEvent.php b/lib/public/Files/ObjectStore/Events/BucketCreatedEvent.php index bd6afcd8209..fc9f5f60538 100644 --- a/lib/public/Files/ObjectStore/Events/BucketCreatedEvent.php +++ b/lib/public/Files/ObjectStore/Events/BucketCreatedEvent.php @@ -17,6 +17,9 @@ use OCP\EventDispatcher\Event; #[Consumable(since: '33.0.0')] class BucketCreatedEvent extends Event { + /** + * @since 33.0.0 + */ public function __construct( private readonly string $bucket, private readonly string $endpoint, @@ -26,18 +29,30 @@ class BucketCreatedEvent extends Event { parent::__construct(); } + /** + * @since 33.0.0 + */ public function getBucket(): string { return $this->bucket; } + /** + * @since 33.0.0 + */ public function getEndpoint(): string { return $this->endpoint; } + /** + * @since 33.0.0 + */ public function getRegion(): string { return $this->region; } + /** + * @since 33.0.0 + */ public function getVersion(): string { return $this->version; } diff --git a/lib/public/Files/Template/FieldType.php b/lib/public/Files/Template/FieldType.php index 2d059cadc17..7d61d5a1040 100644 --- a/lib/public/Files/Template/FieldType.php +++ b/lib/public/Files/Template/FieldType.php @@ -11,9 +11,24 @@ namespace OCP\Files\Template; * @since 30.0.0 */ enum FieldType: string { + /** + * @since 30.0.0 + */ case RichText = 'rich-text'; + /** + * @since 30.0.0 + */ case CheckBox = 'checkbox'; + /** + * @since 30.0.0 + */ case DropDownList = 'drop-down-list'; + /** + * @since 30.0.0 + */ case Picture = 'picture'; + /** + * @since 30.0.0 + */ case Date = 'date'; } diff --git a/lib/public/OCM/Enum/ParamType.php b/lib/public/OCM/Enum/ParamType.php index fa4a19ebe17..571fc61122a 100644 --- a/lib/public/OCM/Enum/ParamType.php +++ b/lib/public/OCM/Enum/ParamType.php @@ -17,8 +17,20 @@ use OCP\AppFramework\Attribute\Consumable; */ #[Consumable(since: '33.0.0')] enum ParamType: string { + /** + * @since 33.0.0 + */ case STRING = 'string'; + /** + * @since 33.0.0 + */ case INT = 'int'; + /** + * @since 33.0.0 + */ case FLOAT = 'float'; + /** + * @since 33.0.0 + */ case BOOL = 'bool'; } diff --git a/lib/public/OpenMetrics/Metric.php b/lib/public/OpenMetrics/Metric.php index 47e925b01b7..303273f7406 100644 --- a/lib/public/OpenMetrics/Metric.php +++ b/lib/public/OpenMetrics/Metric.php @@ -13,6 +13,9 @@ namespace OCP\OpenMetrics; * @since 33.0.0 */ final readonly class Metric { + /** + * @since 33.0.0 + */ public function __construct( public int|float|bool|MetricValue $value = false, /** @var string[] */ @@ -21,6 +24,9 @@ final readonly class Metric { ) { } + /** + * @since 33.0.0 + */ public function label(string $name): ?string { return $this->labels[$name] ?? null; } diff --git a/lib/public/OpenMetrics/MetricType.php b/lib/public/OpenMetrics/MetricType.php index 07449593cc0..043d1e892bb 100644 --- a/lib/public/OpenMetrics/MetricType.php +++ b/lib/public/OpenMetrics/MetricType.php @@ -15,12 +15,36 @@ namespace OCP\OpenMetrics; * @since 33.0.0 */ enum MetricType { + /** + * @since 33.0.0 + */ case counter; + /** + * @since 33.0.0 + */ case gauge; + /** + * @since 33.0.0 + */ case histogram; + /** + * @since 33.0.0 + */ case gaugehistogram; + /** + * @since 33.0.0 + */ case stateset; + /** + * @since 33.0.0 + */ case info; + /** + * @since 33.0.0 + */ case summary; + /** + * @since 33.0.0 + */ case unknown; } diff --git a/lib/public/OpenMetrics/MetricValue.php b/lib/public/OpenMetrics/MetricValue.php index 34922947d25..c8d29c54e39 100644 --- a/lib/public/OpenMetrics/MetricValue.php +++ b/lib/public/OpenMetrics/MetricValue.php @@ -14,7 +14,16 @@ namespace OCP\OpenMetrics; * @since 33.0.0 */ enum MetricValue: string { + /** + * @since 33.0.0 + */ case NOT_A_NUMBER = 'NaN'; + /** + * @since 33.0.0 + */ case POSITIVE_INFINITY = '+Inf'; + /** + * @since 33.0.0 + */ case NEGATIVE_INFINITY = '-Inf'; } diff --git a/lib/public/Snowflake/Snowflake.php b/lib/public/Snowflake/Snowflake.php index 9fce0a5aea2..cc3d38bbe80 100644 --- a/lib/public/Snowflake/Snowflake.php +++ b/lib/public/Snowflake/Snowflake.php @@ -23,6 +23,7 @@ final readonly class Snowflake { * @psalm-param int<0,4095> $sequenceId * @psalm-param non-negative-int $seconds * @psalm-param int<0,999> $milliseconds + * @since 33.0.0 */ public function __construct( private int $serverId, @@ -36,6 +37,7 @@ final readonly class Snowflake { /** * @psalm-return int<0,1023> + * @since 33.0.0 */ public function getServerId(): int { return $this->serverId; @@ -43,17 +45,22 @@ final readonly class Snowflake { /** * @psalm-return int<0,4095> + * @since 33.0.0 */ public function getSequenceId(): int { return $this->sequenceId; } + /** + * @since 33.0.0 + */ public function isCli(): bool { return $this->isCli; } /** * @psalm-return non-negative-int + * @since 33.0.0 */ public function getSeconds(): int { return $this->seconds; @@ -61,11 +68,15 @@ final readonly class Snowflake { /** * @psalm-return int<0,999> + * @since 33.0.0 */ public function getMilliseconds(): int { return $this->milliseconds; } + /** + * @since 33.0.0 + */ public function getCreatedAt(): \DateTimeImmutable { return $this->createdAt; } diff --git a/lib/public/TaskProcessing/EShapeType.php b/lib/public/TaskProcessing/EShapeType.php index 306d285adea..c1c0a1ccd4d 100644 --- a/lib/public/TaskProcessing/EShapeType.php +++ b/lib/public/TaskProcessing/EShapeType.php @@ -17,18 +17,57 @@ use OCP\TaskProcessing\Exception\ValidationException; * @since 30.0.0 */ enum EShapeType: int { + /** + * @since 30.0.0 + */ case Number = 0; + /** + * @since 30.0.0 + */ case Text = 1; + /** + * @since 30.0.0 + */ case Image = 2; + /** + * @since 30.0.0 + */ case Audio = 3; + /** + * @since 30.0.0 + */ case Video = 4; + /** + * @since 30.0.0 + */ case File = 5; + /** + * @since 30.0.0 + */ case Enum = 6; + /** + * @since 30.0.0 + */ case ListOfNumbers = 10; + /** + * @since 30.0.0 + */ case ListOfTexts = 11; + /** + * @since 30.0.0 + */ case ListOfImages = 12; + /** + * @since 30.0.0 + */ case ListOfAudios = 13; + /** + * @since 30.0.0 + */ case ListOfVideos = 14; + /** + * @since 30.0.0 + */ case ListOfFiles = 15; /** diff --git a/lib/public/TaskProcessing/TaskTypes/ContextAgentAudioInteraction.php b/lib/public/TaskProcessing/TaskTypes/ContextAgentAudioInteraction.php index b668ea24806..18464db3d65 100644 --- a/lib/public/TaskProcessing/TaskTypes/ContextAgentAudioInteraction.php +++ b/lib/public/TaskProcessing/TaskTypes/ContextAgentAudioInteraction.php @@ -20,6 +20,9 @@ use OCP\TaskProcessing\ShapeDescriptor; * @since 32.0.0 */ class ContextAgentAudioInteraction implements IInternalTaskType { + /** + * @since 31.0.0 + */ public const ID = 'core:contextagent:audio-interaction'; private IL10N $l; diff --git a/lib/public/TaskProcessing/TaskTypes/ContextAgentInteraction.php b/lib/public/TaskProcessing/TaskTypes/ContextAgentInteraction.php index 6cb126e1894..db327012831 100644 --- a/lib/public/TaskProcessing/TaskTypes/ContextAgentInteraction.php +++ b/lib/public/TaskProcessing/TaskTypes/ContextAgentInteraction.php @@ -20,6 +20,9 @@ use OCP\TaskProcessing\ShapeDescriptor; * @since 31.0.0 */ class ContextAgentInteraction implements IInternalTaskType { + /** + * @since 31.0.0 + */ public const ID = 'core:contextagent:interaction'; private IL10N $l; diff --git a/lib/public/TaskProcessing/TaskTypes/TextToTextChangeTone.php b/lib/public/TaskProcessing/TaskTypes/TextToTextChangeTone.php index 0ea4575a187..7d02d102bec 100644 --- a/lib/public/TaskProcessing/TaskTypes/TextToTextChangeTone.php +++ b/lib/public/TaskProcessing/TaskTypes/TextToTextChangeTone.php @@ -20,6 +20,9 @@ use OCP\TaskProcessing\ShapeDescriptor; * @since 31.0.0 */ class TextToTextChangeTone implements ITaskType { + /** + * @since 31.0.0 + */ public const ID = 'core:text2text:changetone'; private IL10N $l; diff --git a/lib/public/TaskProcessing/TaskTypes/TextToTextChatWithTools.php b/lib/public/TaskProcessing/TaskTypes/TextToTextChatWithTools.php index 3e470bf23ae..53dae3dc3f2 100644 --- a/lib/public/TaskProcessing/TaskTypes/TextToTextChatWithTools.php +++ b/lib/public/TaskProcessing/TaskTypes/TextToTextChatWithTools.php @@ -20,6 +20,9 @@ use OCP\TaskProcessing\ShapeDescriptor; * @since 31.0.0 */ class TextToTextChatWithTools implements IInternalTaskType { + /** + * @since 31.0.0 + */ public const ID = 'core:text2text:chatwithtools'; private IL10N $l; diff --git a/lib/public/Template/ITemplate.php b/lib/public/Template/ITemplate.php index 7131df4d17c..b6b9433b35b 100644 --- a/lib/public/Template/ITemplate.php +++ b/lib/public/Template/ITemplate.php @@ -42,6 +42,7 @@ interface ITemplate { * This function assigns a variable in an array context. If the key already * exists, the value will be appended. It can be accessed via * $_[$key][$position] in the template. + * @since 32.0.0 */ public function append(string $key, mixed $value): void; }