Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation after 2.12 update #891

Closed
vlad-skubko opened this issue Jul 9, 2021 · 11 comments · Fixed by #895
Closed

Deprecation after 2.12 update #891

vlad-skubko opened this issue Jul 9, 2021 · 11 comments · Fixed by #895

Comments

@vlad-skubko
Copy link

vlad-skubko commented Jul 9, 2021

I've updated package to 2.12.3 version, but still have the deprecation notice after bin/console cache:clear [info] User Deprecated: The "Lexik\Bundle\JWTAuthenticationBundle\Security\Guard\JWTTokenAuthenticator" class implements "Symfony\Component\Security\Guard\AuthenticatorInterface" that is deprecated since Symfony 5.3, use the new authenticator system instead.

I'm using new configuration with
stateless: true
jwt: ~

And I'm not using Guard/JWTTokenAuthenticator.php anywhere

@asumkin
Copy link

asumkin commented Jul 13, 2021

Hi.

Try to manually remove cache files and then

bin/console cache:clear --env=...

@MikeDevresse
Copy link

Hi, I'm aving kind of the same issue, it seems to be cache issue.

What's happening ?
I noticed that for the first time that I execute my tests I got the depreciation warning that tells me not to use JWTTokenAuthenticator.
When I execute my tests a second time, the depreciation warning is gone.

What I tweaked to make it work for the first time
I edited vendor/lexik/jwt-authentication-bundle/Resources/config/token_authenticator.xml and removed from line 8 to 17. I am aware that this is not something that could solve the issue but I think it can be a starting point in solving the issue.

@pavlovicnemanja
Copy link

Any solution on this? Clearing cache doesn't work for me. I'm still getting this error:
2021-07-21T22:05:55+00:00 [info] User Deprecated: The "Lexik\Bundle\JWTAuthenticationBundle\Security\Guard\JWTTokenAuthenticator" class implements "Symfony\Component\Security\Guard\AuthenticatorInterface" that is deprecated since Symfony 5.3, use the new authenticator system instead.

@chalasr
Copy link
Collaborator

chalasr commented Jul 22, 2021

I need you to create a small app that reproduces the bug in order to confirm it and fix it.

@pavlovicnemanja
Copy link

pavlovicnemanja commented Jul 22, 2021

Hi @chalasr this is repo with demo code which is throwing error described in previous post: https://github.com/pavlovicnemanja/symfony-skeleton

This is SS:
image

@chalasr
Copy link
Collaborator

chalasr commented Jul 22, 2021

Great, I'll look at this asap. Thank you @pavlovicnemanja

@filoucrackeur
Copy link

same in phpunit

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.

Remaining indirect deprecation notices (2)

  1x: Since symfony/security-guard 5.3: The "Symfony\Component\Security\Guard\Authenticator\GuardBridgeAuthenticator" class is deprecated, use the new authenticator system instead.
    1x in DrmBoxControllerTest::setUp from App\Tests\Functional\Controller

  1x: The "Lexik\Bundle\JWTAuthenticationBundle\Security\Guard\JWTTokenAuthenticator" class implements "Symfony\Component\Security\Guard\AuthenticatorInterface" that is deprecated since Symfony 5.3, use the new authenticator system instead.
    1x in DrmBoxControllerTest::setUp from App\Tests\Functional\Controller

@lxregistry
Copy link

any solution for this deprecated?

User Deprecated: The "Lexik\Bundle\JWTAuthenticationBundle\Security\Guard\JWTTokenAuthenticator" class implements "Symfony\Component\Security\Guard\AuthenticatorInterfa
ce" that is deprecated since Symfony 5.3, use the new authenticator system instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: The "Lexik\Bundl
e\JWTAuthenticationBundle\Security\Guard\JWTTokenAuthenticator" class implements "Symfony\Component\Security\Guard\AuthenticatorInterface" that is deprecated
since Symfony 5.3, use the new authenticator system instead. at .......

@asumkin
Copy link

asumkin commented Jul 28, 2021

Only workaround - clean cache, when remove all files from var/$ENV directory

@chalasr
Copy link
Collaborator

chalasr commented Jul 28, 2021

See #895.
I tested the patch on @pavlovicnemanja's reproducer and it seems to fix the issue.
I'm going to merge and release it by tomorrow. Meanwhile, it'd be great if anyone can try the patch and confirm it works.

@chalasr
Copy link
Collaborator

chalasr commented Jul 28, 2021

Released in v2.12.4, thanks everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants