From f945c0b508a5b6fa6fbf8891fc144fdae5869b8e Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Thu, 7 Nov 2024 22:30:03 -0100 Subject: [PATCH] feat(user-prefs): switching to NCU/ Signed-off-by: Maxence Lange --- lib/private/AllConfig.php | 6 +++--- lib/private/Config/UserPreferences.php | 10 +++++----- lib/private/Server.php | 2 +- .../Config/Exceptions/IncorrectTypeException.php | 2 +- .../Config/Exceptions/TypeConflictException.php | 2 +- .../Config/Exceptions/UnknownKeyException.php | 2 +- lib/{public => unstable}/Config/IUserPreferences.php | 6 +++--- lib/{public => unstable}/Config/ValueType.php | 4 ++-- tests/lib/UserPreferencesTest.php | 8 ++++---- 9 files changed, 21 insertions(+), 21 deletions(-) rename lib/{public => unstable}/Config/Exceptions/IncorrectTypeException.php (88%) rename lib/{public => unstable}/Config/Exceptions/TypeConflictException.php (88%) rename lib/{public => unstable}/Config/Exceptions/UnknownKeyException.php (88%) rename lib/{public => unstable}/Config/IUserPreferences.php (99%) rename lib/{public => unstable}/Config/ValueType.php (95%) diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php index 8f7e5359c967f..dbea65fdc2172 100644 --- a/lib/private/AllConfig.php +++ b/lib/private/AllConfig.php @@ -6,11 +6,11 @@ */ namespace OC; +use NCU\Config\Exceptions\TypeConflictException; +use NCU\Config\IUserPreferences; +use NCU\Config\ValueType; use OC\Config\UserPreferences; use OCP\Cache\CappedMemoryCache; -use OCP\Config\Exceptions\TypeConflictException; -use OCP\Config\IUserPreferences; -use OCP\Config\ValueType; use OCP\IConfig; use OCP\IDBConnection; use OCP\PreConditionNotMetException; diff --git a/lib/private/Config/UserPreferences.php b/lib/private/Config/UserPreferences.php index 6dd9c63383671..d9fd5f6a06499 100644 --- a/lib/private/Config/UserPreferences.php +++ b/lib/private/Config/UserPreferences.php @@ -11,11 +11,11 @@ use Generator; use InvalidArgumentException; use JsonException; -use OCP\Config\Exceptions\IncorrectTypeException; -use OCP\Config\Exceptions\TypeConflictException; -use OCP\Config\Exceptions\UnknownKeyException; -use OCP\Config\IUserPreferences; -use OCP\Config\ValueType; +use NCU\Config\Exceptions\IncorrectTypeException; +use NCU\Config\Exceptions\TypeConflictException; +use NCU\Config\Exceptions\UnknownKeyException; +use NCU\Config\IUserPreferences; +use NCU\Config\ValueType; use OCP\DB\Exception as DBException; use OCP\DB\IResult; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/private/Server.php b/lib/private/Server.php index e109636f1fad4..dc4b3c4f7dc7a 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -7,6 +7,7 @@ namespace OC; use bantu\IniGetWrapper\IniGetWrapper; +use NCU\Config\IUserPreferences; use OC\Accounts\AccountManager; use OC\App\AppManager; use OC\App\AppStore\Bundles\BundleFetcher; @@ -138,7 +139,6 @@ use OCP\Collaboration\Reference\IReferenceManager; use OCP\Command\IBus; use OCP\Comments\ICommentsManager; -use OCP\Config\IUserPreferences; use OCP\Contacts\ContactsMenu\IActionFactory; use OCP\Contacts\ContactsMenu\IContactsStore; use OCP\Defaults; diff --git a/lib/public/Config/Exceptions/IncorrectTypeException.php b/lib/unstable/Config/Exceptions/IncorrectTypeException.php similarity index 88% rename from lib/public/Config/Exceptions/IncorrectTypeException.php rename to lib/unstable/Config/Exceptions/IncorrectTypeException.php index dafbbacff78d2..b3eedde5300f9 100644 --- a/lib/public/Config/Exceptions/IncorrectTypeException.php +++ b/lib/unstable/Config/Exceptions/IncorrectTypeException.php @@ -6,7 +6,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -namespace OCP\Config\Exceptions; +namespace NCU\Config\Exceptions; use Exception; diff --git a/lib/public/Config/Exceptions/TypeConflictException.php b/lib/unstable/Config/Exceptions/TypeConflictException.php similarity index 88% rename from lib/public/Config/Exceptions/TypeConflictException.php rename to lib/unstable/Config/Exceptions/TypeConflictException.php index 0b3c903cb385f..042991f8a57e5 100644 --- a/lib/public/Config/Exceptions/TypeConflictException.php +++ b/lib/unstable/Config/Exceptions/TypeConflictException.php @@ -6,7 +6,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -namespace OCP\Config\Exceptions; +namespace NCU\Config\Exceptions; use Exception; diff --git a/lib/public/Config/Exceptions/UnknownKeyException.php b/lib/unstable/Config/Exceptions/UnknownKeyException.php similarity index 88% rename from lib/public/Config/Exceptions/UnknownKeyException.php rename to lib/unstable/Config/Exceptions/UnknownKeyException.php index 2150246f1d2ad..80626c6a6355a 100644 --- a/lib/public/Config/Exceptions/UnknownKeyException.php +++ b/lib/unstable/Config/Exceptions/UnknownKeyException.php @@ -6,7 +6,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -namespace OCP\Config\Exceptions; +namespace NCU\Config\Exceptions; use Exception; diff --git a/lib/public/Config/IUserPreferences.php b/lib/unstable/Config/IUserPreferences.php similarity index 99% rename from lib/public/Config/IUserPreferences.php rename to lib/unstable/Config/IUserPreferences.php index 18c7fdcd66526..a2695a0d05392 100644 --- a/lib/public/Config/IUserPreferences.php +++ b/lib/unstable/Config/IUserPreferences.php @@ -6,11 +6,11 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -namespace OCP\Config; +namespace NCU\Config; use Generator; -use OCP\Config\Exceptions\IncorrectTypeException; -use OCP\Config\Exceptions\UnknownKeyException; +use NCU\Config\Exceptions\IncorrectTypeException; +use NCU\Config\Exceptions\UnknownKeyException; /** * This class provides an easy way for apps to store user preferences in the diff --git a/lib/public/Config/ValueType.php b/lib/unstable/Config/ValueType.php similarity index 95% rename from lib/public/Config/ValueType.php rename to lib/unstable/Config/ValueType.php index caf510046c263..2c3c5851e3f5d 100644 --- a/lib/public/Config/ValueType.php +++ b/lib/unstable/Config/ValueType.php @@ -6,9 +6,9 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -namespace OCP\Config; +namespace NCU\Config; -use OCP\Config\Exceptions\IncorrectTypeException; +use NCU\Config\Exceptions\IncorrectTypeException; use UnhandledMatchError; /** diff --git a/tests/lib/UserPreferencesTest.php b/tests/lib/UserPreferencesTest.php index 19e6d6161bfc8..c149af002d355 100644 --- a/tests/lib/UserPreferencesTest.php +++ b/tests/lib/UserPreferencesTest.php @@ -7,11 +7,11 @@ */ namespace lib; +use NCU\Config\Exceptions\TypeConflictException; +use NCU\Config\Exceptions\UnknownKeyException; +use NCU\Config\IUserPreferences; +use NCU\Config\ValueType; use OC\Config\UserPreferences; -use OCP\Config\Exceptions\TypeConflictException; -use OCP\Config\Exceptions\UnknownKeyException; -use OCP\Config\IUserPreferences; -use OCP\Config\ValueType; use OCP\IDBConnection; use OCP\Security\ICrypto; use Psr\Log\LoggerInterface;