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

Symfony 6 Compatibility #937

Merged
merged 2 commits into from
Oct 24, 2021
Merged

Symfony 6 Compatibility #937

merged 2 commits into from
Oct 24, 2021

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Oct 17, 2021

This is the work needed for Symfony 6 compatibility. The gist of the changes are:

  • Allow Symfony 6 install
  • Tweak the GitHub actions config, the tested versions are now set in a matrix so there's only one build config instead of duplicating it for each build
  • Drops Symfony 5.3 support, the return signature change in Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface::authenticate() between 5.3 and 5.4 is a bit tricky to deal with while keeping support for the non-LTS 5.3
  • Updates Lexik\Bundle\JWTAuthenticationBundle\DependencyInjection\Security\Factory\JWTAuthenticatorFactory to address the security listener factory -> authenticator factory changes/deprecations in the SecurityBundle in 5.4
  • Adds typehints or doc blocks as needed

@@ -6,12 +6,26 @@
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Guard\Token\GuardTokenInterface;

if (interface_exists(GuardTokenInterface::class)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The compat layer here basically allows the user token class to be usable without the security-guard component.

@chalasr
Copy link
Collaborator

chalasr commented Oct 18, 2021

🙏 Thanks a lot for working on this!

Given the diff on the public API is quite small, I think we can afford the added typehints without releasing a new major.
About the Response::setData(): static, I fear we have to use the same eval() trick that you removed in ForwardCompatTestCaseTrait. Ok for you?

@mbabker
Copy link
Contributor Author

mbabker commented Oct 18, 2021

I fear we have to use the same eval() trick that you removed in ForwardCompatTestCaseTrait. Ok for you?

Yeah, that would probably work out best. I can mess with that later on.

@mbabker mbabker marked this pull request as ready for review October 19, 2021 22:41
@chalasr
Copy link
Collaborator

chalasr commented Oct 24, 2021

Thanks a lot, @mbabker.

@chalasr chalasr merged commit c6ba7c7 into lexik:2.x Oct 24, 2021
@mbabker mbabker deleted the symfony-6 branch October 24, 2021 20:20
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 this pull request may close these issues.

2 participants