Skip to content

Commit 8446077

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: (35 commits) fix tests [DomCrawler][FrameworkBundle] Add `assertAnySelectorText*` fix tests [SecurityBundle] Add `$badges` argument to `Security::login` [FrameworkBundle] Support APP_BUILD_DIR [Scheduler] Add --all to debug:schedule [Cache] minor cleanup [HttpFoundation] Use Symfony exception for request unexpected values [Scheduler] Display friendly dates in debug:schedule [RemoteEvent][Webhook] Add Brevo support [Webhook][RemoteEvent] Add Mailjet support. fix typo fix minimum required HttpKernel component version fix tests Remove remaining experimental classes [RemoteEvent] Mark component as non experimental [Webhook] Mark component as non experimental [Process] Fix return type [Scheduler] Mark component as non experimental [AssetMapper] Mark component as non experimental ...
2 parents ed1cb82 + 2e2d79b commit 8446077

6 files changed

+17
-3
lines changed

User/AttributesBasedUserProviderInterface.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
* Overrides UserProviderInterface to add an "attributes" argument on loadUserByIdentifier.
1818
* This is particularly useful with self-contained access tokens.
1919
*
20-
* @experimental
20+
* @template-covariant TUser of UserInterface
21+
*
22+
* @template-extends UserProviderInterface<TUser>
2123
*/
2224
interface AttributesBasedUserProviderInterface extends UserProviderInterface
2325
{
@@ -26,6 +28,8 @@ interface AttributesBasedUserProviderInterface extends UserProviderInterface
2628
*
2729
* This method must throw UserNotFoundException if the user is not found.
2830
*
31+
* @return TUser
32+
*
2933
* @throws UserNotFoundException
3034
*/
3135
public function loadUserByIdentifier(string $identifier, array $attributes = []): UserInterface;

User/ChainUserProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
* handle the request.
2222
*
2323
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
24+
*
25+
* @template-implements UserProviderInterface<UserInterface>
2426
*/
2527
class ChainUserProvider implements UserProviderInterface, PasswordUpgraderInterface
2628
{

User/InMemoryUserProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
* (a backend with a unique admin for instance)
2222
*
2323
* @author Fabien Potencier <fabien@symfony.com>
24+
*
25+
* @template-implements UserProviderInterface<InMemoryUser>
2426
*/
2527
class InMemoryUserProvider implements UserProviderInterface
2628
{

User/MissingUserProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
* when a firewall requires a user provider but none was defined.
1919
*
2020
* @internal
21+
*
22+
* @template-implements UserProviderInterface<never>
2123
*/
2224
class MissingUserProvider implements UserProviderInterface
2325
{

User/OidcUser.php

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

1414
/**
1515
* UserInterface implementation used by the access-token security workflow with an OIDC server.
16-
*
17-
* @experimental
1816
*/
1917
class OidcUser implements UserInterface
2018
{

User/UserProviderInterface.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
* information is submitted or what the UserInterface object looks like.
2929
*
3030
* @author Fabien Potencier <fabien@symfony.com>
31+
*
32+
* @template-covariant TUser of UserInterface
3133
*/
3234
interface UserProviderInterface
3335
{
@@ -39,6 +41,8 @@ interface UserProviderInterface
3941
* object can just be merged into some internal array of users / identity
4042
* map.
4143
*
44+
* @psalm-return TUser
45+
*
4246
* @throws UnsupportedUserException if the user is not supported
4347
* @throws UserNotFoundException if the user is not found
4448
*/
@@ -54,6 +58,8 @@ public function supportsClass(string $class): bool;
5458
*
5559
* This method must throw UserNotFoundException if the user is not found.
5660
*
61+
* @return TUser
62+
*
5763
* @throws UserNotFoundException
5864
*/
5965
public function loadUserByIdentifier(string $identifier): UserInterface;

0 commit comments

Comments
 (0)