Не удалось определить класс для контроллера, обозначенного <controller> - PullRequest
0 голосов
/ 22 апреля 2020

Я получаю эту ошибку:

Class could not be determined for Controller identified by "FillFormBundle\Controller\ApiLoginController".

. / Config / routing_api.yml:

fillform:
    type: rest
    resource: "@FillFormBundle/Resources/config/routing.yml"
    prefix:   /

. / Src / FillFormBundle / Resources / config / routing.yml:

fillform_login:
  type: rest
  resource: "@FillFormBundle/Controller/ApiLoginController.php"
  name_prefix: api_

fillform_form:
  type:        rest
  resource:    "@FillFormBundle/Controller/Form/FormRestController.php"
  name_prefix: api_

. / src / FillFormBundle / Resources / config / services.yml:

services:   _defaults: { public: true }

  fillform.login:
    class: FillFormBundle\Controller\ApiLoginController

  fillform.form:
    class: FillFormBundle\Controller\Form\FormRestController
    arguments: ['@request_stack']
    calls:
      - [setContainer, ['@service_container']]
      - [setObjectClass, ['Form', 'FormFillBundle:Form']]
      - [setForm, ['Form', '@fillform.form_form']]

  fillform.form_form:
    class: FillFormBundle\Form\FormType
    arguments:
      - '@service_container'
      - 'FormFillBundle:Form'

Моя структура каталогов:

./src/FillFormBundle/Controller
...