Version(s) affected
4.2.x
Description
stable releases are probably also be affected, I haven't checked.
The bundle creates auto-wiring aliases referencing self::class in DI sources (I haven't checked whether they are all affected) while the actual service is not an instance of this type:
|
$container->registerAliasForArgument($service_id, self::class, $name . 'NestedTokenBuilder'); |
How to reproduce
Create a service depending on the NestedTokenLoader or NestedTokenBuilder
Use autowiring to configure the service dependencies.
Possible Solution
No response
Additional Context
Note also that Symfony 7.4 added a $target attribute in ContainerBuilder::registerAliasForArgument() which should probably be used with the config name directly (without suffixing it with things like NestedTokenLoader or NestedTokenBuilder) to make it cleaner when using the Target() attribute to select the autowired service.
Version(s) affected
4.2.x
Description
stable releases are probably also be affected, I haven't checked.
The bundle creates auto-wiring aliases referencing
self::classin DI sources (I haven't checked whether they are all affected) while the actual service is not an instance of this type:jwt-framework/src/Bundle/DependencyInjection/Source/NestedToken/NestedTokenBuilder.php
Line 45 in 98184b5
How to reproduce
Create a service depending on the
NestedTokenLoaderorNestedTokenBuilderUse autowiring to configure the service dependencies.
Possible Solution
No response
Additional Context
Note also that Symfony 7.4 added a
$targetattribute inContainerBuilder::registerAliasForArgument()which should probably be used with the config name directly (without suffixing it with things likeNestedTokenLoaderorNestedTokenBuilder) to make it cleaner when using theTarget()attribute to select the autowired service.