Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 999b289

Browse files
committed
feature #15131 [Security] Moved Simple{Form,Pre}AuthenticatorInterfaces to Security\Http (WouterJ)
This PR was squashed before being merged into the 2.8 branch (closes #15131). Discussion ---------- [Security] Moved Simple{Form,Pre}AuthenticatorInterfaces to Security\Http Description --- The `SimpleFormAuthenticatorInterface` and `SimplePreAuthenticatorInterface` rely on `Request`, which means it's a Http land class. This means they don't belong in core. Having a form login that doesn't depend on the request is an option as well (e.g. a console application might use the question helper to implement a "form" login). However, then there is a need for a new abstraction of the request. I don't think it's worth it. Furthermore, the only classes typehinting/relying on this interfaces can be found in `Security\Http`. Implementation --- The new interfaces extend the old ones for better backwards compability. Symfony doesn't trigger deprecation errors for interfaces, see symfony/symfony@6f57b7b PR Info Table --- | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- ebb2064 [Security] Moved Simple{Form,Pre}AuthenticatorInterfaces to Security\Http
2 parents 185507f + a9b06e1 commit 999b289

File tree

5 files changed

+50
-0
lines changed

5 files changed

+50
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ CHANGELOG
66

77
* deprecated `getKey()` of the `AnonymousToken`, `RememberMeToken` and `AbstractRememberMeServices` classes
88
in favor of `getSecret()`.
9+
* deprecated `Symfony\Component\Security\Core\Authentication\SimplePreAuthenticatorInterface`, use
10+
`Symfony\Component\Security\Http\Authentication\SimplePreAuthenticatorInterface` instead
11+
* deprecated `Symfony\Component\Security\Core\Authentication\SimpleFormAuthenticatorInterface`, use
12+
`Symfony\Component\Security\Http\Authentication\SimpleFormAuthenticatorInterface` instead
913

1014
2.7.0
1115
-----

Core/Authentication/SimpleFormAuthenticatorInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
use Symfony\Component\HttpFoundation\Request;
1515

1616
/**
17+
* @deprecated Deprecated since version 2.8, to be removed in 3.0. Use the same interface from Security\Http\Authentication instead.
18+
*
1719
* @author Jordi Boggiano <j.boggiano@seld.be>
1820
*/
1921
interface SimpleFormAuthenticatorInterface extends SimpleAuthenticatorInterface

Core/Authentication/SimplePreAuthenticatorInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
use Symfony\Component\HttpFoundation\Request;
1515

1616
/**
17+
* @deprecated Since version 2.8, to be removed in 3.0. Use the same interface from Security\Http\Authentication instead.
18+
*
1719
* @author Jordi Boggiano <j.boggiano@seld.be>
1820
*/
1921
interface SimplePreAuthenticatorInterface extends SimpleAuthenticatorInterface
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Security\Http\Authentication;
13+
14+
use Symfony\Component\Security\Core\Authentication\SimpleFormAuthenticatorInterface as BaseSimpleFormAuthenticatorInterface;
15+
16+
/**
17+
* @author Jordi Boggiano <j.boggiano@seld.be>
18+
*/
19+
interface SimpleFormAuthenticatorInterface extends BaseSimpleFormAuthenticatorInterface
20+
{
21+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Security\Http\Authentication;
13+
14+
use Symfony\Component\Security\Core\Authentication\SimplePreAuthenticatorInterface as BaseSimplePreAuthenticatorInterface;
15+
16+
/**
17+
* @author Jordi Boggiano <j.boggiano@seld.be>
18+
*/
19+
interface SimplePreAuthenticatorInterface extends BaseSimplePreAuthenticatorInterface
20+
{
21+
}

0 commit comments

Comments
 (0)