Skip to content

Commit

Permalink
uppercase constants marked as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jan 21, 2024
1 parent b5f6be6 commit fe89d52
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
12 changes: 12 additions & 0 deletions src/Security/Authenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ interface Authenticator extends IAuthenticator
Failure = 3,
NotApproved = 4;

/** @deprecated use Authenticator::IdentityNotFound */
public const IDENTITY_NOT_FOUND = self::IdentityNotFound;

/** @deprecated use Authenticator::InvalidCredential */
public const INVALID_CREDENTIAL = self::InvalidCredential;

/** @deprecated use Authenticator::Failure */
public const FAILURE = self::Failure;

/** @deprecated use Authenticator::NotApproved */
public const NOT_APPROVED = self::NotApproved;

/**
* Performs an authentication.
* @throws AuthenticationException
Expand Down
5 changes: 5 additions & 0 deletions src/Security/Authorizator.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ interface Authorizator
/** Permission type: deny */
public const Deny = false;

/** @deprecated use Authorizator::All */
public const ALL = self::All;

/** @deprecated use Authorizator::Allow */
public const ALLOW = self::Allow;

/** @deprecated use Authorizator::Deny */
public const DENY = self::Deny;

/**
Expand Down
14 changes: 9 additions & 5 deletions src/Security/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,18 @@ class User
LogoutManual = 1,
LogoutInactivity = 2;

/** @deprecated */
public const
MANUAL = self::LogoutManual,
INACTIVITY = self::LogoutInactivity;

/** @deprecated use User::LogoutManual */
public const LOGOUT_MANUAL = self::LogoutManual;

/** @deprecated use User::LogoutManual */
public const MANUAL = self::LogoutManual;

/** @deprecated use User::LogoutInactivity */
public const LOGOUT_INACTIVITY = self::LogoutInactivity;

/** @deprecated use User::LogoutInactivity */
public const INACTIVITY = self::LogoutInactivity;

/** default role for unauthenticated user */
public string $guestRole = 'guest';

Expand Down

0 comments on commit fe89d52

Please sign in to comment.