8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With default routing and services configuration create a simple controller with a non-service class like this:
<?php namespace App\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; class IndexController extends AbstractController { /** * @Route(name="index") */ public function indexAction(A $a) { dump($a); return new Response(); } } class A { }
Expected result: an exception about wrong argument. Actual result:
Which means that a new instance of a non-DI class is injected.
I investigated a little and found that Symfony\Component\HttpKernel\Controller\ArgumentResolver\ServiceValueResolver does this.
Symfony\Component\HttpKernel\Controller\ArgumentResolver\ServiceValueResolver
The text was updated successfully, but these errors were encountered:
AFAIR this is expected behavior since 3.4 and controller action injection.
Sorry, something went wrong.
@vudaltsov : Could you try v3.4.0-BETA2 and setting the container.autowiring.strict_mode to true? It should solve this issue.
container.autowiring.strict_mode
Looks a duplicate of #24569
@ogizanagi , yes, thank you!
No branches or pull requests
With default routing and services configuration create a simple controller with a non-service class like this:
Expected result: an exception about wrong argument. Actual result:
Which means that a new instance of a non-DI class is injected.
I investigated a little and found that
Symfony\Component\HttpKernel\Controller\ArgumentResolver\ServiceValueResolver
does this.The text was updated successfully, but these errors were encountered: