How to access not-injected services directly on Symfony 4+?
问题 I'm trying to update Symfony 2.8 to Symfony 4 and I am having serious problems with the Services Injection. I'm looking the new way to use Services inside Controllers, with auto-wiring: use App\Service\AuxiliarService; class DefaultController extends AbstractController { public function index(AuxiliarService $service) { $var = $service->MyFunction(); .... This way works fine, but I dislike the explicit way to refer MyService as a parameter of the function. This way I don't even need to