From f876f885aa2c40e1cb9ce23e66e77646d90d5898 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Tue, 17 Sep 2024 13:43:18 +1200 Subject: [PATCH] API Use new names for renamed classes --- src/Authenticator/LoginHandler.php | 4 ++-- src/Controller/AdminRegistrationController.php | 2 +- src/Extension/AccountReset/SecurityExtension.php | 2 +- src/Report/EnabledMembers.php | 2 +- src/RequestHandler/RegistrationHandlerTrait.php | 4 ++-- src/Service/RegisteredMethodManager.php | 4 ++-- tests/php/Controller/AdminRegistrationControllerTest.php | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Authenticator/LoginHandler.php b/src/Authenticator/LoginHandler.php index b05486ec..2e3aa88b 100644 --- a/src/Authenticator/LoginHandler.php +++ b/src/Authenticator/LoginHandler.php @@ -19,8 +19,8 @@ use SilverStripe\MFA\Service\EnforcementManager; use SilverStripe\MFA\Service\MethodRegistry; use SilverStripe\MFA\Service\SchemaGenerator; -use SilverStripe\ORM\ValidationException; -use SilverStripe\ORM\ValidationResult; +use SilverStripe\Core\Validation\ValidationException; +use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Security\IdentityStore; use SilverStripe\Security\Member; use SilverStripe\Security\MemberAuthenticator\LoginHandler as BaseLoginHandler; diff --git a/src/Controller/AdminRegistrationController.php b/src/Controller/AdminRegistrationController.php index e28d71e0..942309b4 100644 --- a/src/Controller/AdminRegistrationController.php +++ b/src/Controller/AdminRegistrationController.php @@ -16,7 +16,7 @@ use SilverStripe\MFA\Service\MethodRegistry; use SilverStripe\MFA\Service\RegisteredMethodManager; use SilverStripe\MFA\State\AvailableMethodDetailsInterface; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Security\Member; use SilverStripe\Security\Security; use SilverStripe\Security\SecurityToken; diff --git a/src/Extension/AccountReset/SecurityExtension.php b/src/Extension/AccountReset/SecurityExtension.php index 144cdcd6..3a3b8825 100644 --- a/src/Extension/AccountReset/SecurityExtension.php +++ b/src/Extension/AccountReset/SecurityExtension.php @@ -16,7 +16,7 @@ use SilverStripe\MFA\JSONResponse; use SilverStripe\MFA\RequestHandler\BaseHandlerTrait; use SilverStripe\ORM\FieldType\DBDatetime; -use SilverStripe\ORM\ValidationResult; +use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Security\Member; use SilverStripe\Security\Security; diff --git a/src/Report/EnabledMembers.php b/src/Report/EnabledMembers.php index 4a5a75f1..aea6b190 100644 --- a/src/Report/EnabledMembers.php +++ b/src/Report/EnabledMembers.php @@ -9,7 +9,7 @@ use SilverStripe\Forms\TextField; use SilverStripe\MFA\Model\RegisteredMethod; use SilverStripe\MFA\Service\MethodRegistry; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\DataList; use SilverStripe\Reports\Report; use SilverStripe\Security\Member; diff --git a/src/RequestHandler/RegistrationHandlerTrait.php b/src/RequestHandler/RegistrationHandlerTrait.php index 1b744bf3..bf763d98 100644 --- a/src/RequestHandler/RegistrationHandlerTrait.php +++ b/src/RequestHandler/RegistrationHandlerTrait.php @@ -11,7 +11,7 @@ use SilverStripe\MFA\State\RegisteredMethodDetailsInterface; use SilverStripe\MFA\State\Result; use SilverStripe\MFA\Store\StoreInterface; -use SilverStripe\ORM\ValidationResult; +use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Security\SecurityToken; /** @@ -73,7 +73,7 @@ public function createStartRegistrationResponse( * @param MethodInterface $method * @param HTTPRequest $request * @return Result - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function completeRegistrationRequest( StoreInterface $store, diff --git a/src/Service/RegisteredMethodManager.php b/src/Service/RegisteredMethodManager.php index db18eb03..ef228d42 100644 --- a/src/Service/RegisteredMethodManager.php +++ b/src/Service/RegisteredMethodManager.php @@ -65,7 +65,7 @@ public function getFromMember(Member $member, MethodInterface $method): ?Registe * @param MethodInterface $method * @param mixed $data * @return bool Whether the method was added/replace - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function registerForMember(Member $member, MethodInterface $method, $data = null): bool { @@ -144,7 +144,7 @@ public function canRemoveMethod(Member $member, MethodInterface $method): bool * @param Member&MemberExtension $member * @param MethodInterface $method * @return bool Returns false if the given method is not registered for the member - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function deleteFromMember(Member $member, MethodInterface $method): bool { diff --git a/tests/php/Controller/AdminRegistrationControllerTest.php b/tests/php/Controller/AdminRegistrationControllerTest.php index aedc40b2..4ea573d8 100644 --- a/tests/php/Controller/AdminRegistrationControllerTest.php +++ b/tests/php/Controller/AdminRegistrationControllerTest.php @@ -19,7 +19,7 @@ use SilverStripe\MFA\State\AvailableMethodDetails; use SilverStripe\MFA\Store\SessionStore; use SilverStripe\MFA\Tests\Stub\BasicMath\Method as BasicMathMethod; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Security\Member; use SilverStripe\Security\Security; use SilverStripe\Security\SecurityToken;