Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

The controller for URI "/medicos" is not callable: Controller "App\Controller\MedicosController" cannot be fetched from the container because it is private. Did you forget to tag the service with "controller.service_arguments"?

Curso: Symfony Parte 1: Criação de uma API Restful Aula 03 Atividade 02

Ao clicar em send no postman estava retornando o seguinte erro: The controller for URI "/medicos" is not callable: Controller "App\Controller\MedicosController" cannot be fetched from the container because it is private. Did you forget to tag the service with "controller.service_arguments"?

Consegui solucionar acrescentando public: true no arquivo services.yaml da pasta config ficou assim:

services:
    # default configuration for services in *this* file
    _defaults:
        autowire: true      # Automatically injects dependencies in your services.
        autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
        public: true

então fica a dica pra quem está com essa mesma situação.

1 resposta
solução!

Este post foi solucionado

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software