Skip to content

Commit 7b3e687

Browse files
author
Robin Chalas
committed
[Security] Deprecate simple_preauth and simple_form in favor of Guard
1 parent a9d0834 commit 7b3e687

7 files changed

+22
-0
lines changed

Authentication/SimpleAuthenticationHandler.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1919
use Symfony\Component\Security\Core\Exception\AuthenticationException;
2020

21+
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.2, use Guard instead.', SimpleAuthenticationHandler::class), E_USER_DEPRECATED);
22+
2123
/**
2224
* Class to proxy authentication success/failure handlers.
2325
*
@@ -26,6 +28,8 @@
2628
* the default handlers are triggered.
2729
*
2830
* @author Jordi Boggiano <j.boggiano@seld.be>
31+
*
32+
* @deprecated since Symfony 4.2, use Guard instead.
2933
*/
3034
class SimpleAuthenticationHandler implements AuthenticationFailureHandlerInterface, AuthenticationSuccessHandlerInterface
3135
{

Authentication/SimpleFormAuthenticatorInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
/**
1818
* @author Jordi Boggiano <j.boggiano@seld.be>
19+
*
20+
* @deprecated since Symfony 4.2, use Guard instead.
1921
*/
2022
interface SimpleFormAuthenticatorInterface extends SimpleAuthenticatorInterface
2123
{

Authentication/SimplePreAuthenticatorInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
/**
1818
* @author Jordi Boggiano <j.boggiano@seld.be>
19+
*
20+
* @deprecated since Symfony 4.2, use Guard instead.
1921
*/
2022
interface SimplePreAuthenticatorInterface extends SimpleAuthenticatorInterface
2123
{

Firewall/SimpleFormAuthenticationListener.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,12 @@
2929
use Symfony\Component\Security\Http\ParameterBagUtils;
3030
use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface;
3131

32+
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.2, use Guard instead.', SimpleFormAuthenticationListener::class), E_USER_DEPRECATED);
33+
3234
/**
3335
* @author Jordi Boggiano <j.boggiano@seld.be>
36+
*
37+
* @deprecated since Symfony 4.2, use Guard instead.
3438
*/
3539
class SimpleFormAuthenticationListener extends AbstractAuthenticationListener
3640
{

Firewall/SimplePreAuthenticationListener.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@
3131
use Symfony\Component\Security\Http\SecurityEvents;
3232
use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface;
3333

34+
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.2, use Guard instead.', SimplePreAuthenticationListener::class), E_USER_DEPRECATED);
35+
3436
/**
3537
* SimplePreAuthenticationListener implements simple proxying to an authenticator.
3638
*
3739
* @author Jordi Boggiano <j.boggiano@seld.be>
40+
*
41+
* @deprecated since Symfony 4.2, use Guard instead.
3842
*/
3943
class SimplePreAuthenticationListener implements ListenerInterface
4044
{

Tests/Authentication/SimpleAuthenticationHandlerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface;
2020
use Symfony\Component\Security\Http\Authentication\SimpleAuthenticationHandler;
2121

22+
/**
23+
* @group legacy
24+
*/
2225
class SimpleAuthenticationHandlerTest extends TestCase
2326
{
2427
private $successHandler;

Tests/Firewall/SimplePreAuthenticationListenerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
use Symfony\Component\Security\Http\Firewall\SimplePreAuthenticationListener;
1919
use Symfony\Component\Security\Http\SecurityEvents;
2020

21+
/**
22+
* @group legacy
23+
*/
2124
class SimplePreAuthenticationListenerTest extends TestCase
2225
{
2326
private $authenticationManager;

0 commit comments

Comments
 (0)