fix(comments): Clarify stability of comments API

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2025-07-10 22:06:59 +02:00
parent 088d6843b7
commit dd4e8957ea
No known key found for this signature in database
GPG key ID: F72FA5B49FFA96B0
8 changed files with 25 additions and 0 deletions

View file

@ -7,6 +7,7 @@
*/
namespace OCP\Comments;
use OCP\AppFramework\Attribute\Listenable;
use OCP\EventDispatcher\Event;
/**
@ -15,6 +16,7 @@ use OCP\EventDispatcher\Event;
* @since 9.1.0
* @since 28.0.0 Dispatched as a typed event
*/
#[Listenable('28.0.0')]
class CommentsEntityEvent extends Event {
/**
* @since 9.1.0

View file

@ -7,6 +7,7 @@
*/
namespace OCP\Comments;
use OCP\AppFramework\Attribute\Listenable;
use OCP\EventDispatcher\Event;
/**
@ -14,6 +15,7 @@ use OCP\EventDispatcher\Event;
*
* @since 9.0.0
*/
#[Listenable('28.0.0')]
class CommentsEvent extends Event {
/**
* @since 11.0.0

View file

@ -7,6 +7,8 @@
*/
namespace OCP\Comments;
use OCP\AppFramework\Attribute\Consumable;
/**
* Interface IComment
*
@ -14,6 +16,7 @@ namespace OCP\Comments;
*
* @since 9.0.0
*/
#[Consumable('9.0.0')]
interface IComment {
/**
* @since 9.0.0

View file

@ -7,6 +7,8 @@
*/
namespace OCP\Comments;
use OCP\AppFramework\Attribute\Consumable;
use OCP\AppFramework\Attribute\ExceptionalImplementable;
use OCP\IUser;
use OCP\PreConditionNotMetException;
@ -17,6 +19,8 @@ use OCP\PreConditionNotMetException;
*
* @since 9.0.0
*/
#[Consumable('9.0.0')]
#[ExceptionalImplementable('spreed', \OCA\Talk\Chat\CommentsManager::class)]
interface ICommentsManager {
/**
* @const DELETED_USER type and id for a user that has been deleted

View file

@ -16,7 +16,9 @@ use OCP\IServerContainer;
* instance.
*
* @since 9.0.0
* @deprecated 32.0.0 It is no longer supported to store the comments in another location
*/
#[\Deprecated('It is no longer supported to store the comments in another location', '32.0.0')]
interface ICommentsManagerFactory {
/**
* Constructor for the comments manager factory

View file

@ -7,9 +7,13 @@
*/
namespace OCP\Comments;
use OCP\AppFramework\Attribute\Catchable;
/**
* Exception for illegal attempts to modify a comment ID
*
* @since 9.0.0
*/
#[Catchable('9.0.0')]
class IllegalIDChangeException extends \Exception {
}

View file

@ -7,9 +7,13 @@
*/
namespace OCP\Comments;
use OCP\AppFramework\Attribute\Catchable;
/**
* Exception thrown when a comment message exceeds the allowed character limit
*
* @since 9.0.0
*/
#[Catchable('9.0.0')]
class MessageTooLongException extends \OverflowException {
}

View file

@ -7,9 +7,13 @@
*/
namespace OCP\Comments;
use OCP\AppFramework\Attribute\Catchable;
/**
* Exception for not found entity
*
* @since 9.0.0
*/
#[Catchable('9.0.0')]
class NotFoundException extends \Exception {
}