The 3.3 version of the docs assume that the reader uses a Standard Edition based on the config we provide for Symfony 3.3 or uses Symfony Flex where you get the same config. However, someone having an existing application that was just upgraded to Symfony 3.3 does not have all controllers registered as services. We should think about how we could improve understanding for them to avoid confusions like in symfony/symfony#23033.
Hi,
I have the same issue, and it doesn't fix it when i register my controller as a service.
The answer given by @chalasr doesn't work for me. When i put it as he wrote it, i have an issue saying that a tags entry must be an array.
And another one because no class is set for AppBundle\Controller\RegistrationController
I have this in my service.yml:
```
services:
AppBundle\Controller\RegistrationController:
class: AppBundle\Controller\RegistrationController
autowire: true # or define your controller constructor and configure its arguments explicitly
tags:
- name: controller.service_arguments
You did not put it as I wrote it :)
- tags:
- - name: controller.service_arguments
+ tags: ['controller.service_arguments']
Yeah I know but it didn't work when il write it this way. I got an error saying that a "tags" entry should be an array
@Stormkirk Please open an issue at https://github.com/symfony/symfony if you are using Symfony 3.3 and this doesn't work for you with some steps on how to reproduce your issue.
I'm not usine symfony 3.3 but 3.2.4
Well, the short notation for tags is a new feature of Symfony 3.3. And the controller.service_arguments tag also is not supported on Symfony 3.2. Please be sure to read the version of the documentation that matches the version of the Symfony version you use. :)
@xabbuh https://symfony.com/doc/current/service_container.html . So i'm using symfony 3.3.9 with documentation 3.3 and if one follows the documentation example doesn't work. The "controller.service_arguments" is under the second-last paragraph "Importing Many Services at once with resource" 馃憥
@max4ever Can you show an example project with the changes that you did and that were not working for you?
I'm writing post about this feature but could not find it.
Found something in commit: https://github.com/symfony/symfony-docs/commit/cbedd79950b14fa778dde05cf54f3027bbeb02d2, but not in the docs (probably moved/deleted in master now)
And something like this is too vague: https://symfony.com/doc/current/service_container/3.3-di-changes.html#controllers-are-registered-as-services
symfony/symfony#30569 helps
I'm closing this issue because I think the current docs are enough ... and the improved error messages in Symfony perfectly explain what is happening and how to solve it. Thanks.
Most helpful comment
You did not put it as I wrote it :)