Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a17ee3a

Browse files
committed
Updated deprecation versions to 4.4
1 parent 613789f commit a17ee3a

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

src/Symfony/Component/Security/CHANGELOG.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
CHANGELOG
22
=========
33

4+
4.4.0
5+
-----
6+
7+
* Deprecated `IS_AUTHENTICATED_ANONYMOUSLY` in favor of `IS_AUTHENTICATED`
8+
* Deprecated `IS_AUTHENTICATED_REMEMBERED` in favor of `IS_REMEMBERED`
9+
* Added `IS_ANONYMOUS`
10+
* Deprecated `is_anonymous()`, `is_remember_me()`, `is_authenticated()` and `is_fully_authenticated()` in favor of `is_granted(attribute)`
11+
412
4.3.0
513
-----
614

@@ -23,10 +31,6 @@ CHANGELOG
2331
* Dispatch `SwitchUserEvent` on `security.switch_user`
2432
* Deprecated `Argon2iPasswordEncoder`, use `SodiumPasswordEncoder` instead
2533
* Deprecated `BCryptPasswordEncoder`, use `NativePasswordEncoder` instead
26-
* Deprecated `IS_AUTHENTICATED_ANONYMOUSLY` in favor of `IS_AUTHENTICATED`
27-
* Deprecated `IS_AUTHENTICATED_REMEMBERED` in favor of `IS_REMEMBERED`
28-
* Added `IS_ANONYMOUS`
29-
* Deprecated `is_anonymous()`, `is_remember_me()`, `is_authenticated()` and `is_fully_authenticated()` in favor of `is_granted(attribute)`
3034

3135
4.2.0
3236
-----

src/Symfony/Component/Security/Core/Authorization/ExpressionLanguageProvider.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,31 @@ public function getFunctions()
2525
{
2626
return [
2727
new ExpressionFunction('is_anonymous', function () {
28-
@trigger_error("is_anonymous() is deprecated since version 4.3 and will be removed in 5.0. Use is_granted('IS_ANONYMOUS') instead.", E_USER_DEPRECATED);
28+
@trigger_error("is_anonymous() is deprecated since version 4.4 and will be removed in 5.0. Use is_granted('IS_ANONYMOUS') instead.", E_USER_DEPRECATED);
2929

3030
return '$trust_resolver->isAnonymous($token)';
3131
}, function (array $variables) {
32-
@trigger_error("is_anonymous() is deprecated since version 4.3 and will be removed in 5.0. Use is_granted('IS_ANONYMOUS') instead.", E_USER_DEPRECATED);
32+
@trigger_error("is_anonymous() is deprecated since version 4.4 and will be removed in 5.0. Use is_granted('IS_ANONYMOUS') instead.", E_USER_DEPRECATED);
3333

3434
return $variables['trust_resolver']->isAnonymous($variables['token']);
3535
}),
3636

3737
new ExpressionFunction('is_authenticated', function () {
38-
@trigger_error("is_authenticated() is deprecated since version 4.3 and will be removed in 5.0. Use is_granted('IS_AUTHENTICATED') instead.", E_USER_DEPRECATED);
38+
@trigger_error("is_authenticated() is deprecated since version 4.4 and will be removed in 5.0. Use is_granted('IS_AUTHENTICATED') instead.", E_USER_DEPRECATED);
3939

4040
return '$token && !$trust_resolver->isAnonymous($token)';
4141
}, function (array $variables) {
42-
@trigger_error("is_authenticated() is deprecated since version 4.3 and will be removed in 5.0. Use is_granted('IS_AUTHENTICATED') instead.", E_USER_DEPRECATED);
42+
@trigger_error("is_authenticated() is deprecated since version 4.4 and will be removed in 5.0. Use is_granted('IS_AUTHENTICATED') instead.", E_USER_DEPRECATED);
4343

4444
return $variables['token'] && !$variables['trust_resolver']->isAnonymous($variables['token']);
4545
}),
4646

4747
new ExpressionFunction('is_fully_authenticated', function () {
48-
@trigger_error("is_fully_authenticated() is deprecated since version 4.3 and will be removed in 5.0. Use is_granted('IS_AUTHENTICATED_FULLY') instead.", E_USER_DEPRECATED);
48+
@trigger_error("is_fully_authenticated() is deprecated since version 4.4 and will be removed in 5.0. Use is_granted('IS_AUTHENTICATED_FULLY') instead.", E_USER_DEPRECATED);
4949

5050
return '$trust_resolver->isFullFledged($token)';
5151
}, function (array $variables) {
52-
@trigger_error("is_fully_authenticated() is deprecated since version 4.3 and will be removed in 5.0. Use is_granted('IS_AUTHENTICATED_FULLY') instead.", E_USER_DEPRECATED);
52+
@trigger_error("is_fully_authenticated() is deprecated since version 4.4 and will be removed in 5.0. Use is_granted('IS_AUTHENTICATED_FULLY') instead.", E_USER_DEPRECATED);
5353

5454
return $variables['trust_resolver']->isFullFledged($variables['token']);
5555
}),
@@ -61,11 +61,11 @@ public function getFunctions()
6161
}),
6262

6363
new ExpressionFunction('is_remember_me', function () {
64-
@trigger_error("is_remember_me() is deprecated since version 4.3 and will be removed in 5.0. Use is_granted('IS_REMEMBERED') instead.", E_USER_DEPRECATED);
64+
@trigger_error("is_remember_me() is deprecated since version 4.4 and will be removed in 5.0. Use is_granted('IS_REMEMBERED') instead.", E_USER_DEPRECATED);
6565

6666
return '$trust_resolver->isRememberMe($token)';
6767
}, function (array $variables) {
68-
@trigger_error("is_remember_me() is deprecated since version 4.3 and will be removed in 5.0. Use is_granted('IS_REMEMBERED') instead.", E_USER_DEPRECATED);
68+
@trigger_error("is_remember_me() is deprecated since version 4.4 and will be removed in 5.0. Use is_granted('IS_REMEMBERED') instead.", E_USER_DEPRECATED);
6969

7070
return $variables['trust_resolver']->isRememberMe($variables['token']);
7171
}),

src/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ class AuthenticatedVoter implements VoterInterface
3131
const IS_ANONYMOUS = 'IS_ANONYMOUS';
3232
const IS_IMPERSONATOR = 'IS_IMPERSONATOR';
3333
const IS_REMEMBERED = 'IS_REMEMBERED';
34-
/** @deprecated since 4.3 */
34+
/** @deprecated since 4.4 */
3535
const IS_AUTHENTICATED_ANONYMOUSLY = 'IS_AUTHENTICATED_ANONYMOUSLY';
36-
/** @deprecated since 4.3 */
36+
/** @deprecated since 4.4 */
3737
const IS_AUTHENTICATED_REMEMBERED = 'IS_AUTHENTICATED_REMEMBERED';
3838

3939
private $authenticationTrustResolver;
@@ -70,7 +70,7 @@ public function vote(TokenInterface $token, $subject, array $attributes)
7070
if (self::IS_AUTHENTICATED_REMEMBERED === $attribute
7171
&& ($this->authenticationTrustResolver->isRememberMe($token)
7272
|| $this->authenticationTrustResolver->isFullFledged($token))) {
73-
@trigger_error(sprintf('Using "%s" is deprecated since version 4.3 and will be removed in 5.0. Use "%s" instead.', self::IS_AUTHENTICATED_REMEMBERED, self::IS_REMEMBERED), E_USER_DEPRECATED);
73+
@trigger_error(sprintf('Using "%s" is deprecated since version 4.4 and will be removed in 5.0. Use "%s" instead.', self::IS_AUTHENTICATED_REMEMBERED, self::IS_REMEMBERED), E_USER_DEPRECATED);
7474

7575
return VoterInterface::ACCESS_GRANTED;
7676
}
@@ -80,7 +80,7 @@ public function vote(TokenInterface $token, $subject, array $attributes)
8080
|| $this->authenticationTrustResolver->isRememberMe($token)
8181
|| $this->authenticationTrustResolver->isFullFledged($token))) {
8282
if ($bc) {
83-
@trigger_error(sprintf('Using "%s" is deprecated since version 4.3 and will be removed in 5.0. Use "%s" instead.', self::IS_AUTHENTICATED_ANONYMOUSLY, self::IS_AUTHENTICATED), E_USER_DEPRECATED);
83+
@trigger_error(sprintf('Using "%s" is deprecated since version 4.4 and will be removed in 5.0. Use "%s" instead.', self::IS_AUTHENTICATED_ANONYMOUSLY, self::IS_AUTHENTICATED), E_USER_DEPRECATED);
8484
}
8585

8686
return VoterInterface::ACCESS_GRANTED;

0 commit comments

Comments
 (0)