Skip to content

Tag: symfony

Manually switch _locale in symfony 4

I’m absolutely stuck in getting a solution to manually switch the _locale variable in Symfony 4. I followed these steps, but now I have absolutely no idea how to make a simple switch button in the nav section. I also took a look a this question, but this seems to be an older Symfony version.. Can anyone…

Symfony 4 : Override public services in container

I am migrating our project to Symfony 4. In my test suites, we used PHPUnit for functional tests (I mean, we call endpoints and we check result). Often, we mock services to check different steps. Since I migrated to Symfony 4, I am facing this issue: SymfonyComponentDependencyInjectionExceptionInvalidArgument…

Symfony 4 – Autowiring not working

I have a form that write values to an specific Entity, and I am trying to edit the information through a function in the controller, pretty simple. BancoController.php The problem is, when I access /banco/{id}, I get the error: My service.yaml is all default, so I guess it should work automatically. The entit…