-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
Symfony 5.4 -> 6.4 upgrade problems #1216
Comments
OK so I think I've found a semi-workaround for the issue 1. I have multiple firewalls, so I've aliased one of them:
The contract of the Still stuck on problem number 2. After installing |
OK I've changed the composer to require |
Hi, This is compatible with the given versions of php and SF. I am with SF6.4, PHP 8.3 and JWT 2.20.3 and it works properly. You may have missed this part of an upgrade : https://github.com/lexik/LexikJWTAuthenticationBundle/blob/3.x/UPGRADE-2.0.md especially the listener section (latest item of the removed options in the configuration section) |
The thing is that I was not upgrading Lexik from 1.x to 2.x. I was on
Please help me understand how can this work? As soon as I downgrade back from
|
Hi, The bundle is compatible with both SF version but it requires to update your configuration to target right authenticator, handler, listener. You can rollback your symfony version to 5.4, setup some tests on your authentication endpoint and look at what is marked as deprecated and update the configuration. |
Can you point me in the general direction that prevents Lexik from loading the deprecated Services? I've gone through the migration documents couple of times and still can't get rid of the error. Digging through the source files I can see that the As for the deprecations, I can see what is deptecated from looking at the code, but the deprecation messeges don't have any suggestions on what to use instead. It seems that the 2.x branch is by default configured for Symfony 5.4 and there is no documentation on how to configure it for 6.4. |
This loads the deprecated services. So nothing should prevent the service loading. The service is loaded but the services it depends on ( The only thing I can think of is the migration guide I pointed earlier: no listener are required now as this is part of the authenticator role. Maybe your code uses the service too. |
The thig is I'm not using any listeners, outside of Kernel Event Listeners for Events defined in
causes the Symfony's Same goes for
I'm not explicitly using those services anywhere, but they are being loaded (but not instantiated, I've checked) while the Container is being built and the whole thing collapses. |
https://github.com/lexik/LexikJWTAuthenticationBundle/blob/v2.20.3/Security/Authenticator/JWTAuthenticator.php is what you're looking for I think. |
This call as well as all Guard-related logics are disabled depending on the installed version of |
Sorry for being a pain in the butt, but can you point me to the code that is responsible for conditional loading of this call? Because all I can see is this straightforward load of the guard_authenticator.xml in the Same goes for the deprecated services here. |
Hello
I am in the process of upgrading from Symfony 5.4 to 6.4 and I'm stuck on Lexik:
requiring
security.authentication.manager
Service that is no longer there. What am I doing wrong? I am using latest stable version -2.20.3
.LexikJWTAuthenticationExtension
is loading thedeprecated_51.xml
file that contains a Servicelexik_jwt_authentication.security.authentication.listener
, which in turn requiressecurity.authentication.manager
that has been removed in Symfony 6.0. I don't see any logic that prevents this from happening. How can this version be compatible with Symfony 6.x?After (temporarily) commenting out the above service definition in the `deprecated_51.xml' file, I am facing another error:
Class "Symfony\Component\Security\Guard\AuthenticatorInterface" not found while loading "Lexik\Bundle\JWTAuthenticationBundle\Security\Guard\JWTTokenAuthenticator".
From what I can see, the
security-guard
package is not available for Symfony 6.4. How to proceed? Because either I am doing something terribly wrong, or the2.20.3
version is not compatible with Symfony 6.The text was updated successfully, but these errors were encountered: