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
6.2.* (and maybe other)
A wrong Container is injected when using #[TaggedLocator('XXX')] in an argument of a controller constructor
#[TaggedLocator('XXX')]
add this controller
class AController extends AbstractController { public function __construct( #[TaggedLocator('foobar')] private readonly ContainerInterface $foo, ) { } #[Route('/', name: 'app_a')] public function index( ): JsonResponse { dd($this->foo); return $this->json([ 'message' => 'Welcome to your new controller!', 'path' => 'src/Controller/AController.php', ]); } }
We can work-arround this issue with the following constructor:
public function __construct( #[TaggedLocator('foobar')] - private readonly ContainerInterface $foo, + private readonly ServiceLocator $foo, ) { }
but ...
I guess - there is a conflict with the "ServiceSubscriberInterface"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Symfony version(s) affected
6.2.* (and maybe other)
Description
A wrong Container is injected when using
#[TaggedLocator('XXX')]
in an argument of a controller constructorHow to reproduce
add this controller
Possible Solution
We can work-arround this issue with the following constructor:
but ...
Additional Context
I guess - there is a conflict with the "ServiceSubscriberInterface"
The text was updated successfully, but these errors were encountered: