docs(ocp): Add since tag

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
pull/59940/head
Daniel Kesselberg 1 month ago
parent aee960cc5a
commit 25ca85e329
No known key found for this signature in database
GPG Key ID: 4A81C29F63464E8F
  1. 11
      build/psalm-baseline.xml
  2. 4
      lib/public/AppFramework/Attribute/ASince.php
  3. 9
      lib/public/AppFramework/Attribute/ExceptionalImplementable.php
  4. 3
      lib/public/AppFramework/Controller.php
  5. 10
      lib/public/AppFramework/Db/SnowflakeAwareEntity.php
  6. 1
      lib/public/AppFramework/Http/Attribute/RequestHeader.php
  7. 7
      lib/public/AppFramework/PublicShareController.php
  8. 30
      lib/public/BackgroundJob/Job.php
  9. 10
      lib/public/Calendar/CalendarExportOptions.php
  10. 34
      lib/public/Calendar/CalendarImportOptions.php
  11. 2
      lib/public/Comments/CommentsEvent.php
  12. 2
      lib/public/Comments/Events/BeforeCommentUpdatedEvent.php
  13. 2
      lib/public/Comments/Events/CommentAddedEvent.php
  14. 2
      lib/public/Comments/Events/CommentDeletedEvent.php
  15. 2
      lib/public/Comments/Events/CommentUpdatedEvent.php
  16. 3
      lib/public/ContextChat/Events/ContentProviderRegisterEvent.php
  17. 6
      lib/public/ContextChat/Type/UpdateAccessOp.php
  18. 4
      lib/public/DB/QueryBuilder/ConflictResolutionMode.php
  19. 35
      lib/public/DB/QueryBuilder/ITypedQueryBuilder.php
  20. 2
      lib/public/Files/Cache/CacheEntriesRemovedEvent.php
  21. 3
      lib/public/Files/Config/Event/UserMountAddedEvent.php
  22. 3
      lib/public/Files/Config/Event/UserMountRemovedEvent.php
  23. 3
      lib/public/Files/Config/Event/UserMountUpdatedEvent.php
  24. 1
      lib/public/Files/Config/IPartialMountProvider.php
  25. 3
      lib/public/Files/Config/MountProviderArgs.php
  26. 12
      lib/public/Files/Conversion/ConversionMimeProvider.php
  27. 3
      lib/public/Files/DavUtil.php
  28. 3
      lib/public/Files/Events/BeforeRemotePropfindEvent.php
  29. 6
      lib/public/Files/ISetupManager.php
  30. 15
      lib/public/Files/ObjectStore/Events/BucketCreatedEvent.php
  31. 15
      lib/public/Files/Template/FieldType.php
  32. 12
      lib/public/OCM/Enum/ParamType.php
  33. 6
      lib/public/OpenMetrics/Metric.php
  34. 24
      lib/public/OpenMetrics/MetricType.php
  35. 9
      lib/public/OpenMetrics/MetricValue.php
  36. 11
      lib/public/Snowflake/Snowflake.php
  37. 39
      lib/public/TaskProcessing/EShapeType.php
  38. 3
      lib/public/TaskProcessing/TaskTypes/ContextAgentAudioInteraction.php
  39. 3
      lib/public/TaskProcessing/TaskTypes/ContextAgentInteraction.php
  40. 3
      lib/public/TaskProcessing/TaskTypes/TextToTextChangeTone.php
  41. 3
      lib/public/TaskProcessing/TaskTypes/TextToTextChatWithTools.php
  42. 1
      lib/public/Template/ITemplate.php

@ -44,6 +44,9 @@
<DeprecatedConstant>
<code><![CDATA[CommentsEvent::EVENT_ADD]]></code>
</DeprecatedConstant>
<DeprecatedMethod>
<code><![CDATA[getEvent]]></code>
</DeprecatedMethod>
</file>
<file src="apps/comments/lib/Listener/CommentsEventListener.php">
<DeprecatedConstant>
@ -52,6 +55,9 @@
<code><![CDATA[CommentsEvent::EVENT_PRE_UPDATE]]></code>
<code><![CDATA[CommentsEvent::EVENT_UPDATE]]></code>
</DeprecatedConstant>
<DeprecatedMethod>
<code><![CDATA[getEvent]]></code>
</DeprecatedMethod>
</file>
<file src="apps/comments/lib/MaxAutoCompleteResultsInitialState.php">
<DeprecatedMethod>
@ -63,6 +69,10 @@
<code><![CDATA[CommentsEvent::EVENT_DELETE]]></code>
<code><![CDATA[CommentsEvent::EVENT_PRE_UPDATE]]></code>
</DeprecatedConstant>
<DeprecatedMethod>
<code><![CDATA[getEvent]]></code>
<code><![CDATA[getEvent]]></code>
</DeprecatedMethod>
</file>
<file src="apps/dav/appinfo/v1/publicwebdav.php">
<InternalMethod>
@ -2083,7 +2093,6 @@
<file src="apps/provisioning_api/lib/Middleware/ProvisioningApiMiddleware.php">
<DeprecatedMethod>
<code><![CDATA[hasAnnotation]]></code>
<code><![CDATA[hasAnnotation]]></code>
</DeprecatedMethod>
<InvalidReturnType>
<code><![CDATA[Response]]></code>

@ -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;
}

@ -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;
}

@ -141,6 +141,9 @@ abstract class Controller {
. $format . '!');
}
/**
* @since 33.0.0
*/
public function isResponderRegistered(string $responder): bool {
return isset($this->responders[$responder]);
}

@ -26,12 +26,16 @@ abstract class SnowflakeAwareEntity extends Entity {
/** @psalm-param $_fieldTypes array<string, Types::*> */
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;

@ -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,

@ -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) ?? '[]';

@ -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);
}

@ -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;

@ -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)) {

@ -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;

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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,
) {

@ -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';
}

@ -17,10 +17,14 @@ namespace OCP\DB\QueryBuilder;
enum ConflictResolutionMode {
/**
* Wait for the row to be unlocked.
*
* @since 34.0.0
*/
case Ordinary;
/**
* Skip the row if it is locked.
*
* @since 34.0.0
*/
case SkipLocked;
}

@ -22,6 +22,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
/**
* @inheritDoc
* @return IResult<S>
* @since 34.0.0
*/
#[Override]
public function executeQuery(?IDBConnection $connection = null): IResult;
@ -29,6 +30,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
/**
* @inheritDoc
* @internal This method does not work with {@see self}. Use {@see self::selectColumns()} or {@see self::selectAlias()} instead.
* @since 34.0.0
*/
#[Override]
public function select(...$selects);
@ -46,6 +48,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
/**
* @inheritDoc
* @internal This method does not work with {@see self}. Use {@see self::selectColumnDistinct()} or {@see self::selectAlias()} instead.
* @since 34.0.0
*/
#[Override]
public function selectDistinct($select);
@ -63,6 +66,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
/**
* @inheritDoc
* @internal This method does not work with {@see self}. Use {@see self::selectColumns()} or {@see self::selectAlias()} instead.
* @since 34.0.0
*/
#[Override]
public function addSelect(...$select);
@ -75,6 +79,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @psalm-this-out self<S|NewS>
* @return $this
* @note Psalm has a bug that prevents inferring the correct type in chained calls: https://github.com/vimeo/psalm/issues/8803. Convert the chained calls to standalone calls or switch to PHPStan, which suffered the same bug in the past, but fixed it in 2.1.5: https://github.com/phpstan/phpstan/issues/8439
* @since 34.0.0
*/
#[Override]
public function selectAlias($select, $alias): self;
@ -83,6 +88,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function setParameter($key, $value, $type = null);
@ -90,6 +96,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
/**
* @inheritDoc
* @return $this
* @since 34.0.0
*/
#[Override]
public function setParameters(array $params, array $types = []);
@ -98,6 +105,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function setFirstResult($firstResult);
@ -106,6 +114,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function setMaxResults($maxResults);
@ -114,6 +123,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function delete($delete = null, $alias = null);
@ -122,6 +132,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function update($update = null, $alias = null);
@ -130,6 +141,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function insert($insert = null);
@ -138,6 +150,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function from($from, $alias = null);
@ -146,6 +159,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function join($fromAlias, $join, $alias, $condition = null);
@ -154,6 +168,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function innerJoin($fromAlias, $join, $alias, $condition = null);
@ -162,6 +177,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function leftJoin($fromAlias, $join, $alias, $condition = null);
@ -170,6 +186,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function rightJoin($fromAlias, $join, $alias, $condition = null);
@ -178,6 +195,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function set($key, $value);
@ -186,6 +204,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function where(...$predicates);
@ -194,6 +213,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function andWhere(...$where);
@ -202,6 +222,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function orWhere(...$where);
@ -210,6 +231,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function groupBy(...$groupBys);
@ -218,6 +240,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function addGroupBy(...$groupBy);
@ -226,6 +249,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function setValue($column, $value);
@ -233,6 +257,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
/**
* @inheritDoc
* @return $this
* @since 34.0.0
*/
#[Override]
public function values(array $values);
@ -241,6 +266,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function having(...$having);
@ -249,6 +275,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function andHaving(...$having);
@ -257,6 +284,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function orHaving(...$having);
@ -265,6 +293,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function orderBy($sort, $order = null);
@ -273,6 +302,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function addOrderBy($sort, $order = null);
@ -281,6 +311,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function resetQueryParts($queryPartNames = null);
@ -289,6 +320,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
* @inheritDoc
* @return $this
* @psalm-suppress MissingParamType
* @since 34.0.0
*/
#[Override]
public function resetQueryPart($queryPartName);
@ -296,6 +328,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
/**
* @inheritDoc
* @return $this
* @since 34.0.0
*/
#[Override]
public function hintShardKey(string $column, mixed $value, bool $overwrite = false): self;
@ -303,6 +336,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
/**
* @inheritDoc
* @return $this
* @since 34.0.0
*/
#[Override]
public function runAcrossAllShards(): self;
@ -310,6 +344,7 @@ interface ITypedQueryBuilder extends IQueryBuilder {
/**
* @inheritDoc
* @return $this
* @since 34.0.0
*/
#[Override]
public function forUpdate(ConflictResolutionMode $conflictResolutionMode = ConflictResolutionMode::Ordinary): self;

@ -21,6 +21,7 @@ use OCP\EventDispatcher\Event;
class CacheEntriesRemovedEvent extends Event {
/**
* @param ICacheEvent[] $cacheEntryRemovedEvents
* @since 34.0.0
*/
public function __construct(
private readonly array $cacheEntryRemovedEvents,
@ -30,6 +31,7 @@ class CacheEntriesRemovedEvent extends Event {
/**
* @return ICacheEvent[]
* @since 34.0.0
*/
public function getCacheEntryRemovedEvents(): array {
return $this->cacheEntryRemovedEvents;

@ -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,
) {

@ -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,
) {

@ -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,

@ -50,6 +50,7 @@ interface IPartialMountProvider extends IMountProvider {
* in the scope of the setup request.
* @param IStorageFactory $loader
* @return array<string, IMountPoint> IMountPoint instances, indexed by mount-point
* @since 33.0.0
*/
public function getMountsForPath(
string $setupPathHint,

@ -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,

@ -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;
}

@ -80,6 +80,9 @@ class DavUtil {
return $p;
}
/**
* @since 34.0.0
*/
public static function canRename(FileInfo $info, FileInfo $parent): bool {
// the root of a movable mountpoint can be renamed regardless of the file permissions
if ($info->getMountPoint() instanceof IMovableMount && $info->getInternalPath() === '') {

@ -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,
) {

@ -30,11 +30,14 @@ interface ISetupManager {
*
* @throws \OCP\HintException
* @throws \OC\ServerNotAvailableException
* @since 34.0.0
*/
public function setupForUser(IUser $user): void;
/**
* Tear down all file systems to free some memory.
*
* @since 34.0.0
*/
public function tearDown(): void;
@ -44,11 +47,14 @@ interface ISetupManager {
*
* @throws \OCP\HintException
* @throws \OC\ServerNotAvailableException
* @since 34.0.0
*/
public function setupForPath(string $path, bool $includeChildren = false): void;
/**
* Get whether the file system is already setup for a specific user.
*
* @since 34.0.0
*/
public function isSetupComplete(IUser $user): bool;
}

@ -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;
}

@ -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';
}

@ -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';
}

@ -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[] */
@ -22,6 +25,9 @@ final readonly class Metric {
$this->validateLabels();
}
/**
* @since 33.0.0
*/
public function label(string $name): ?string {
return $this->labels[$name] ?? null;
}

@ -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;
}

@ -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';
}

@ -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;
}

@ -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;
/**

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;
}

Loading…
Cancel
Save