aboutsummaryrefslogtreecommitdiffstats
path: root/lib/unstable/Config/Lexicon
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unstable/Config/Lexicon')
-rw-r--r--lib/unstable/Config/Lexicon/ConfigLexiconEntry.php50
-rw-r--r--lib/unstable/Config/Lexicon/ConfigLexiconStrictness.php26
-rw-r--r--lib/unstable/Config/Lexicon/IConfigLexicon.php13
-rw-r--r--lib/unstable/Config/Lexicon/Preset.php47
4 files changed, 121 insertions, 15 deletions
diff --git a/lib/unstable/Config/Lexicon/ConfigLexiconEntry.php b/lib/unstable/Config/Lexicon/ConfigLexiconEntry.php
index 068d89ce764..2587cd52c01 100644
--- a/lib/unstable/Config/Lexicon/ConfigLexiconEntry.php
+++ b/lib/unstable/Config/Lexicon/ConfigLexiconEntry.php
@@ -16,9 +16,16 @@ use NCU\Config\ValueType;
*
* @see IConfigLexicon
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
+ * @psalm-suppress DeprecatedClass
*/
class ConfigLexiconEntry {
- /** @experimental 32.0.0 */
+ /**
+ * @experimental 32.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
+ */
public const RENAME_INVERT_BOOLEAN = 1;
private string $definition = '';
@@ -34,6 +41,8 @@ class ConfigLexiconEntry {
* @param bool $deprecated set config key as deprecated
*
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
* @psalm-suppress PossiblyInvalidCast
* @psalm-suppress RiskyCast
*/
@@ -64,6 +73,8 @@ class ConfigLexiconEntry {
*
* @return string config key
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
*/
public function getKey(): string {
return $this->key;
@@ -74,6 +85,9 @@ class ConfigLexiconEntry {
*
* @return ValueType
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
+ * @psalm-suppress DeprecatedClass
*/
public function getValueType(): ValueType {
return $this->type;
@@ -83,6 +97,8 @@ class ConfigLexiconEntry {
* @param string $default
* @return string
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
*/
private function convertFromString(string $default): string {
return $default;
@@ -92,6 +108,8 @@ class ConfigLexiconEntry {
* @param int $default
* @return string
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
*/
private function convertFromInt(int $default): string {
return (string)$default;
@@ -101,6 +119,8 @@ class ConfigLexiconEntry {
* @param float $default
* @return string
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
*/
private function convertFromFloat(float $default): string {
return (string)$default;
@@ -110,6 +130,8 @@ class ConfigLexiconEntry {
* @param bool $default
* @return string
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
*/
private function convertFromBool(bool $default): string {
return ($default) ? '1' : '0';
@@ -119,6 +141,8 @@ class ConfigLexiconEntry {
* @param array $default
* @return string
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
*/
private function convertFromArray(array $default): string {
return json_encode($default);
@@ -129,6 +153,10 @@ class ConfigLexiconEntry {
*
* @return string|null NULL if no default is set
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
+ * @psalm-suppress DeprecatedClass
+ * @psalm-suppress DeprecatedMethod
*/
public function getDefault(Preset $preset): ?string {
if ($this->default !== null) {
@@ -157,8 +185,13 @@ class ConfigLexiconEntry {
*
* @return string
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
* @psalm-suppress PossiblyInvalidCast arrays are managed pre-cast
* @psalm-suppress RiskyCast
+ * @psalm-suppress DeprecatedClass
+ * @psalm-suppress DeprecatedMethod
+ * @psalm-suppress DeprecatedConstant
*/
public function convertToString(string|int|float|bool|array $entry): string {
// in case $default is array but is not expected to be an array...
@@ -181,6 +214,8 @@ class ConfigLexiconEntry {
*
* @return string
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
*/
public function getDefinition(): string {
return $this->definition;
@@ -192,6 +227,8 @@ class ConfigLexiconEntry {
* @see IAppConfig for details on lazy config values
* @return bool TRUE if config value is lazy
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
*/
public function isLazy(): bool {
return $this->lazy;
@@ -203,6 +240,8 @@ class ConfigLexiconEntry {
* @see IAppConfig for details on sensitive config values
* @return int bitflag about the config value
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
*/
public function getFlags(): int {
return $this->flags;
@@ -213,6 +252,9 @@ class ConfigLexiconEntry {
*
* @return bool TRUE is config value bitflag contains $flag
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
+ * @psalm-suppress DeprecatedMethod
*/
public function isFlagged(int $flag): bool {
return (($flag & $this->getFlags()) === $flag);
@@ -224,6 +266,8 @@ class ConfigLexiconEntry {
*
* @return string|null not NULL if value can be imported from a previous key
* @experimental 32.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
*/
public function getRename(): ?string {
return $this->rename;
@@ -231,6 +275,8 @@ class ConfigLexiconEntry {
/**
* @experimental 32.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
* @return bool TRUE if $option was set during the creation of the entry.
*/
public function hasOption(int $option): bool {
@@ -242,6 +288,8 @@ class ConfigLexiconEntry {
*
* @return bool TRUE if config si deprecated
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry
+ * @see \OCP\Config\Lexicon\Entry
*/
public function isDeprecated(): bool {
return $this->deprecated;
diff --git a/lib/unstable/Config/Lexicon/ConfigLexiconStrictness.php b/lib/unstable/Config/Lexicon/ConfigLexiconStrictness.php
index a6490675c8a..2ccd7bd265c 100644
--- a/lib/unstable/Config/Lexicon/ConfigLexiconStrictness.php
+++ b/lib/unstable/Config/Lexicon/ConfigLexiconStrictness.php
@@ -17,14 +17,32 @@ namespace NCU\Config\Lexicon;
* - **ConfigLexiconStrictness::EXCEPTION** - block (throws exception) and report
*
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Strictness
+ * @see \OCP\Config\Lexicon\Strictness
*/
enum ConfigLexiconStrictness {
- /** @experimental 31.0.0 */
+ /**
+ * @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Strictness
+ * @see \OCP\Config\Lexicon\Strictness
+ */
case IGNORE; // fully ignore
- /** @experimental 31.0.0 */
+ /**
+ * @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Strictness
+ * @see \OCP\Config\Lexicon\Strictness
+ */
case NOTICE; // ignore and report
- /** @experimental 31.0.0 */
+ /**
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Strictness
+ * @see \OCP\Config\Lexicon\Strictness
+ * @experimental 31.0.0
+ */
case WARNING; // silently block (returns $default) and report
- /** @experimental 31.0.0 */
+ /**
+ * @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Strictness
+ * @see \OCP\Config\Lexicon\Strictness
+ */
case EXCEPTION; // block (throws exception) and report
}
diff --git a/lib/unstable/Config/Lexicon/IConfigLexicon.php b/lib/unstable/Config/Lexicon/IConfigLexicon.php
index 3fedb5f1f08..74dc19e7728 100644
--- a/lib/unstable/Config/Lexicon/IConfigLexicon.php
+++ b/lib/unstable/Config/Lexicon/IConfigLexicon.php
@@ -13,6 +13,8 @@ namespace NCU\Config\Lexicon;
* The config lexicon is used to avoid conflicts and problems when storing/retrieving config values
*
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\ILexicon
+ * @see \OCP\Config\Lexicon\ILexicon
*/
interface IConfigLexicon {
@@ -20,9 +22,12 @@ interface IConfigLexicon {
* Define the expected behavior when using config
* keys not set within your application config lexicon.
*
- * @see ConfigLexiconStrictness
* @return ConfigLexiconStrictness
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\ILexicon
+ * @see \OCP\Config\Lexicon\ILexicon
+ * @psalm-suppress DeprecatedClass
+ *
*/
public function getStrictness(): ConfigLexiconStrictness;
@@ -31,6 +36,9 @@ interface IConfigLexicon {
*
* @return ConfigLexiconEntry[]
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\ILexicon
+ * @see \OCP\Config\Lexicon\ILexicon
+ * @psalm-suppress DeprecatedClass
*/
public function getAppConfigs(): array;
@@ -39,6 +47,9 @@ interface IConfigLexicon {
*
* @return ConfigLexiconEntry[]
* @experimental 31.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\ILexicon
+ * @see \OCP\Config\Lexicon\ILexicon
+ * @psalm-suppress DeprecatedClass
*/
public function getUserConfigs(): array;
}
diff --git a/lib/unstable/Config/Lexicon/Preset.php b/lib/unstable/Config/Lexicon/Preset.php
index 92a6fd8cbfa..b2a98ed5647 100644
--- a/lib/unstable/Config/Lexicon/Preset.php
+++ b/lib/unstable/Config/Lexicon/Preset.php
@@ -23,24 +23,53 @@ namespace NCU\Config\Lexicon;
* - **Preset::PRIVATE** - Private
*
* @experimental 32.0.0
+ * @deprecated 32.0.0 use \OCP\Config\Lexicon\Preset
+ * @see \OCP\Config\Lexicon\Preset
*/
enum Preset: int {
- /** @experimental 32.0.0 */
+ /**
+ * @experimental 32.0.0
+ * @deprecated 32.0.0
+ */
case LARGE = 8;
- /** @experimental 32.0.0 */
+ /**
+ * @experimental 32.0.0
+ * @deprecated 32.0.0
+ */
case MEDIUM = 7;
- /** @experimental 32.0.0 */
+ /**
+ * @experimental 32.0.0
+ * @deprecated 32.0.0
+ */
case SMALL = 6;
- /** @experimental 32.0.0 */
+ /**
+ * @experimental 32.0.0
+ * @deprecated 32.0.0
+ */
case SHARED = 5;
- /** @experimental 32.0.0 */
+ /**
+ * @experimental 32.0.0
+ * @deprecated 32.0.0
+ */
case EDUCATION = 4;
- /** @experimental 32.0.0 */
+ /**
+ * @experimental 32.0.0
+ * @deprecated 32.0.0
+ */
case CLUB = 3;
- /** @experimental 32.0.0 */
+ /**
+ * @experimental 32.0.0
+ * @deprecated 32.0.0
+ */
case FAMILY = 2;
- /** @experimental 32.0.0 */
+ /**
+ * @experimental 32.0.0
+ * @deprecated 32.0.0
+ */
case PRIVATE = 1;
- /** @experimental 32.0.0 */
+ /**
+ * @experimental 32.0.0
+ * @deprecated 32.0.0
+ */
case NONE = 0;
}