Skip to content

Commit 0458647

Browse files
committed
uppercase constants marked as deprecated
1 parent b5116f3 commit 0458647

File tree

4 files changed

+28
-11
lines changed

4 files changed

+28
-11
lines changed

Diff for: src/Security/Authenticator.php

+11-6
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,17 @@ interface Authenticator
2222
Failure = 3,
2323
NotApproved = 4;
2424

25-
/** Deprecated */
26-
public const
27-
IDENTITY_NOT_FOUND = self::IdentityNotFound,
28-
INVALID_CREDENTIAL = self::InvalidCredential,
29-
FAILURE = self::Failure,
30-
NOT_APPROVED = self::NotApproved;
25+
/** @deprecated use Authenticator::IdentityNotFound */
26+
public const IDENTITY_NOT_FOUND = self::IdentityNotFound;
27+
28+
/** @deprecated use Authenticator::InvalidCredential */
29+
public const INVALID_CREDENTIAL = self::InvalidCredential;
30+
31+
/** @deprecated use Authenticator::Failure */
32+
public const FAILURE = self::Failure;
33+
34+
/** @deprecated use Authenticator::NotApproved */
35+
public const NOT_APPROVED = self::NotApproved;
3136

3237
/**
3338
* Performs an authentication.

Diff for: src/Security/Authorizator.php

+5
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ interface Authorizator
2525
/** Permission type: deny */
2626
public const Deny = false;
2727

28+
/** @deprecated use Authorizator::All */
2829
public const ALL = self::All;
30+
31+
/** @deprecated use Authorizator::Allow */
2932
public const ALLOW = self::Allow;
33+
34+
/** @deprecated use Authorizator::Deny */
3035
public const DENY = self::Deny;
3136

3237
/**

Diff for: src/Security/User.php

+9-5
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,23 @@ class User
2828
{
2929
use Nette\SmartObject;
3030

31-
/** @deprecated */
32-
public const
33-
MANUAL = UserStorage::LOGOUT_MANUAL,
34-
INACTIVITY = UserStorage::LOGOUT_INACTIVITY;
35-
3631
/** Log-out reason */
3732
public const
3833
LogoutManual = UserStorage::LogoutManual,
3934
LogoutInactivity = UserStorage::LogoutInactivity;
4035

36+
/** @deprecated use User::LogoutManual */
4137
public const LOGOUT_MANUAL = self::LogoutManual;
38+
39+
/** @deprecated use User::LogoutManual */
40+
public const MANUAL = self::LogoutManual;
41+
42+
/** @deprecated use User::LogoutInactivity */
4243
public const LOGOUT_INACTIVITY = self::LogoutInactivity;
4344

45+
/** @deprecated use User::LogoutInactivity */
46+
public const INACTIVITY = self::LogoutInactivity;
47+
4448
/** default role for unauthenticated user */
4549
public string $guestRole = 'guest';
4650

Diff for: src/Security/UserStorage.php

+3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ interface UserStorage
2020
LogoutManual = 1,
2121
LogoutInactivity = 2;
2222

23+
/** @deprecated use User::LogoutManual */
2324
public const LOGOUT_MANUAL = self::LogoutManual;
25+
26+
/** @deprecated use User::LogoutInactivity */
2427
public const LOGOUT_INACTIVITY = self::LogoutInactivity;
2528

2629
/**

0 commit comments

Comments
 (0)