diff --git a/lib/public/Comments/CommentsEntityEvent.php b/lib/public/Comments/CommentsEntityEvent.php index 39568151b61..cffd87fd617 100644 --- a/lib/public/Comments/CommentsEntityEvent.php +++ b/lib/public/Comments/CommentsEntityEvent.php @@ -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 diff --git a/lib/public/Comments/CommentsEvent.php b/lib/public/Comments/CommentsEvent.php index 04d592d4f1e..8917f5b2031 100644 --- a/lib/public/Comments/CommentsEvent.php +++ b/lib/public/Comments/CommentsEvent.php @@ -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 diff --git a/lib/public/Comments/IComment.php b/lib/public/Comments/IComment.php index cdfcf188761..56646c62dff 100644 --- a/lib/public/Comments/IComment.php +++ b/lib/public/Comments/IComment.php @@ -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 diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php index 7e59b5c7b06..0e3e4e70211 100644 --- a/lib/public/Comments/ICommentsManager.php +++ b/lib/public/Comments/ICommentsManager.php @@ -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 diff --git a/lib/public/Comments/ICommentsManagerFactory.php b/lib/public/Comments/ICommentsManagerFactory.php index bfe6154a48f..b7262f0f338 100644 --- a/lib/public/Comments/ICommentsManagerFactory.php +++ b/lib/public/Comments/ICommentsManagerFactory.php @@ -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 diff --git a/lib/public/Comments/IllegalIDChangeException.php b/lib/public/Comments/IllegalIDChangeException.php index 08eddfc6fa4..096f8154770 100644 --- a/lib/public/Comments/IllegalIDChangeException.php +++ b/lib/public/Comments/IllegalIDChangeException.php @@ -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 { } diff --git a/lib/public/Comments/MessageTooLongException.php b/lib/public/Comments/MessageTooLongException.php index 4358dc2e291..95ae6913a5f 100644 --- a/lib/public/Comments/MessageTooLongException.php +++ b/lib/public/Comments/MessageTooLongException.php @@ -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 { } diff --git a/lib/public/Comments/NotFoundException.php b/lib/public/Comments/NotFoundException.php index 4f25fdbf09f..a824d8bd3c1 100644 --- a/lib/public/Comments/NotFoundException.php +++ b/lib/public/Comments/NotFoundException.php @@ -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 { }