Skip to content

Symfony 7.3 resource tags, need to update documentation #1288

@default-gena

Description

@default-gena

https://symfony.com/blog/new-in-symfony-7-3-dependency-injection-improvements#resource-tags
https://symfony.com/bundles/LexikJWTAuthenticationBundle/current/8-jwt-user-provider.html

namespace App\Security;

final class User implements JWTUserInterface
{
    // Your own logic

    public function __construct($username, array $roles, $email)

Need to change to

use Symfony\Component\DependencyInjection\Attribute\Exclude;

#[Exclude]
final class User implements JWTUserInterface {}

Without this change, [CurrentUser] will not works, because class User will be "service" and DI will be broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions