-
-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unexpected deprecation about Guard (bis)
- Loading branch information
Showing
6 changed files
with
52 additions
and
41 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
DependencyInjection/Compiler/DeprecateLegacyGuardAuthenticatorPass.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Lexik\Bundle\JWTAuthenticationBundle\DependencyInjection\Compiler; | ||
|
||
use Lexik\Bundle\JWTAuthenticationBundle\Security\Guard\JWTTokenAuthenticator; | ||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Reference; | ||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
class DeprecateLegacyGuardAuthenticatorPass implements CompilerPassInterface | ||
{ | ||
public function process(ContainerBuilder $container) | ||
{ | ||
if (!$container->hasParameter('lexik_jwt_authentication.authenticator_manager_enabled') || !$container->getParameter('lexik_jwt_authentication.authenticator_manager_enabled')) { | ||
return; | ||
} | ||
|
||
$container | ||
->getDefinition('lexik_jwt_authentication.security.guard.jwt_token_authenticator') | ||
->setDeprecated('lexik/jwt-authentication-bundle', '2.4', 'The "%service_id%" service is deprecated since LexikJWTAuthenticationBundle version 2.0 and will be removed in 3.0, use the new "jwt" authenticator instead.'); | ||
} | ||
} | ||
|
33 changes: 0 additions & 33 deletions
33
DependencyInjection/Compiler/RegisterLegacyGuardAuthenticatorPass.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" ?> | ||
|
||
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
|
||
<services> | ||
<service id="lexik_jwt_authentication.jwt_token_authenticator" alias="lexik_jwt_authentication.security.guard.jwt_token_authenticator" /> | ||
|
||
<service id="lexik_jwt_authentication.security.guard.jwt_token_authenticator" class="Lexik\Bundle\JWTAuthenticationBundle\Security\Guard\JWTTokenAuthenticator"> | ||
<argument type="service" id="lexik_jwt_authentication.jwt_manager"/> | ||
<argument type="service" id="event_dispatcher"/> | ||
<argument type="service" id="lexik_jwt_authentication.extractor.chain_extractor"/> | ||
<argument type="service"> | ||
<service class="Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage" /> | ||
</argument> | ||
</service> | ||
</services> | ||
</container> |