Skip to content

Commit b0044cd

Browse files
API Deprecate API which was removed or changed in CMS 6 (#599)
1 parent cb6dc9a commit b0044cd

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/Controller/AdminRegistrationController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ class AdminRegistrationController extends LeftAndMain
3232

3333
private static $url_segment = 'mfa';
3434

35+
/**
36+
* @deprecated 5.4.0 Will be removed without equivalent functionality to replace it
37+
*/
3538
private static $ignore_menuitem = true;
3639

3740
private static $url_handlers = [

src/Extension/MemberExtension.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace SilverStripe\MFA\Extension;
66

77
use SilverStripe\Control\Controller;
8+
use SilverStripe\Dev\Deprecation;
89
use SilverStripe\Forms\FieldList;
910
use SilverStripe\MFA\Authenticator\ChangePasswordHandler;
1011
use SilverStripe\MFA\Exception\InvalidMethodException;
@@ -171,9 +172,11 @@ public function providePermissions(): array
171172

172173
/**
173174
* Clear any temporary multi-factor authentication related session keys when a member is successfully logged in.
175+
* @deprecated 5.4.0 Will be renamed to onAfterMemberLoggedIn()
174176
*/
175177
public function afterMemberLoggedIn(): void
176178
{
179+
Deprecation::noticeWithNoReplacment('5.4.0', 'Will be renamed to onAfterMemberLoggedIn()');
177180
if (!Controller::has_curr()) {
178181
return;
179182
}

src/Extension/RequirementsExtension.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use SilverStripe\Admin\LeftAndMain;
66
use SilverStripe\Core\Extension;
7+
use SilverStripe\Dev\Deprecation;
78
use SilverStripe\MFA\RequestHandler\BaseHandlerTrait;
89

910
/**
@@ -15,9 +16,11 @@ class RequirementsExtension extends Extension
1516

1617
/**
1718
* @see LeftAndMain::init()
19+
* @deprecated 5.4.0 Will be renamed to onInit()
1820
*/
1921
public function init()
2022
{
23+
Deprecation::noticeWithNoReplacment('5.4.0', 'Will be renamed to onInit()');
2124
// As requirements for this module are dynamic - plugin methods apply their own requirements - we need to
2225
// include these requirements at run-time (opposed to using $extra_requirements_*)
2326
$this->applyRequirements(false);

0 commit comments

Comments
 (0)