aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/AppFramework/Attribute/ASince.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/AppFramework/Attribute/ASince.php')
-rw-r--r--lib/public/AppFramework/Attribute/ASince.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/public/AppFramework/Attribute/ASince.php b/lib/public/AppFramework/Attribute/ASince.php
new file mode 100644
index 00000000000..1e0c45348cf
--- /dev/null
+++ b/lib/public/AppFramework/Attribute/ASince.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCP\AppFramework\Attribute;
+
+use Attribute;
+
+/**
+ * Abstract base attribute to declare an API's stability.
+ *
+ * @since 32.0.0
+ */
+#[Consumable(since: '32.0.0')]
+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.
+ */
+ public function __construct(
+ protected string $since,
+ ) {
+ }
+
+ public function getSince(): string {
+ return $this->since;
+ }
+}