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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Symfony 5.2 getProviderKey deprecation #790

Merged
merged 1 commit into from
Nov 14, 2020
Merged

Conversation

ogizanagi
Copy link
Contributor

馃憢 Hi

Since symfony/security-http 5.2: Method "Lexik\Bundle\JWTAuthenticationBundle\Security\Authentication\Token\JWTUserToken::getProviderKey()" has been deprecated, rename it to "getFirewallName()" instead.

from symfony/symfony#37942

@chalasr
Copy link
Collaborator

chalasr commented Nov 14, 2020

Thank you @ogizanagi.

@chalasr chalasr merged commit 3974427 into lexik:master Nov 14, 2020
@chalasr
Copy link
Collaborator

chalasr commented Nov 14, 2020

I will add the missing travis build for 5.2 and release this in the week

@ogizanagi ogizanagi deleted the patch-1 branch November 14, 2020 11:30
@@ -37,7 +37,7 @@ public function __construct(array $roles = [], UserInterface $user = null, $rawT
$this->setRawToken($rawToken);
$this->setAuthenticated(true);

$this->providerKey = $providerKey;
$this->providerKey = $firewallName;
Copy link

Choose a reason for hiding this comment

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

Why don't you change the property name to $this->firewallName as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the property is protected, so it would have been a BC break

/**
* @return string
*/
public function getFirewallName()
{
return $this->providerKey;
Copy link

Choose a reason for hiding this comment

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

Same as above.

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.

None yet

3 participants