У меня проблемы с пользовательским контроллером с Symfony4 и платформой API.
{"@context": "/ api / contexts / Error", "@type": "hydra:Ошибка ",
" hydra: title ":" Произошла ошибка "," hydra: description ":" Controller \ "\ App \ Controller \ CategoryController \" имеет обязательные аргументы конструктора и не существует в контейнере.забыли определить такой сервис? "," trace ": [{" namespace ":" "," short_class ":" "," class ":" "," type ":" "," function ":" ","file": "C: \ Users \ Jonny \ Desktop \ Workspace \ php \ documentarywire \ vendor \ symfony \ http-kernel \ Controller \ ContainerControllerResolver.php", "line": 62, "args": []}, {"namespace": "Symfony \ Component \ HttpKernel \ Controller", "short_class": "ContainerControllerResolver", "class": "Symfony \ Component \ HttpKernel \ Controller \ ContainerControllerResolver", "тип": "->", "function": "instantiateController", "file": "C: \ Users \ Jonny \ Desktop \ Workspace \ php \ documentarywire \ vendor \ symfony \ framework-bundle \ Controller \ ControllerResolver.php "," line ": 54," args ": [[" string "," \ App \ Controller \ CategoryController "]]}, {" namespace ":" Symfony \ Bundle \ FrameworkBundle \ Controller "," short_class ":"ControllerResolver", "class": "Symfony \ Bundle \ FrameworkBundle \ Controller \ ControllerResolver", "type": "->", "function": "instantiateController", "file": "C: \ Users \ Jonny \ Desktop\ Workspace \ php \ documentarywire \ vendor \ symfony \ http-kernel \ Controller \ ControllerResolver.php "," line ": 110," args ": [[" string "," \ App \ Controller \ CategoryController "]]},{"namespace": "Symfony \ Component \ HttpKernel \ Controller", "short_class": "ControllerResolver", "class": "Symfony \ Component \ HttpKernel \ Controller \ ControllerResolver", "type": "->", "function":" createController "," file ":" C: \ Users \ Jonny \ Desktop \ Workspace \ php \ documentarywire \ vendor \ symfony \ http-kernel \ Controller \ ContainerControllerResolver.php "," line ": 42," args ": [["string", "\ App \ Controller \ CategoryController :: show"]]}, {"пространство имен": "Symfony \ Component \ HttpKernel \ Controller", "short_class ":" ContainerControllerResolver "," class ":" Symfony \ Component \ HttpKernel \ Controller \ ContainerControllerResolver "," type ":" -> "," function ":" createController "," file ":" C: \ Users \Jonny \ Desktop \ Workspace \ php \ documentarywire \ vendor \ symfony \ framework-bundle \ Controller \ ControllerResolver.php "," line ": 46," args ": [[" string "," \ App \ Controller \ CategoryController ::show "]]}, {" namespace ":" Symfony \ Bundle \ FrameworkBundle \ Controller "," short_class ":" ControllerResolver "," class ":" Symfony \ Bundle \ FrameworkBundle \ Controller \ ControllerResolver "," type ":"-> "," function ":" createController "," file ":" C: \ Users \ Jonny \ Desktop \ Workspace \ php \ documentarywire \ vendor \ symfony \ http-kernel \ Controller \ ControllerResolver.php "," line ": 85, "args": [["string", "\ App \ Controller \ CategoryController :: show"]]}, {"пространство имен": "Symfony \ Component \ HttpKernel \ Controller", "short_class": "ControllerResolver", "class": "Symfony \ Component \ HttpKernel \ Controller \ ControllerResolver", "type": "->", "function":"getController", "file": "C: \ Users \ Jonny \ Desktop \ Workspace \ php \ documentarywire \ vendor \ symfony \ http-kernel \ Controller \ TraceableControllerResolver.php", "line": 38,"args": [["object", "Symfony \ Component \ HttpFoundation \ Request"]]}, {"namespace": "Symfony \ Component \ HttpKernel \ Controller", "short_class": "TraceableControllerResolver", "class":"Symfony \ Component \ HttpKernel \ Controller \ TraceableControllerResolver", "type": "->", "function": "getController", "file": "C: \ Users \ Jonny \ Desktop \ Workspace \ php \ documentarywire \ vendor"\ symfony \ http-kernel \ HttpKernel.php "," line ": 134," args ": [[" object "," Symfony \ Component \ HttpFoundation \ Request "]]}, {" namespace ":" Symfony \ Component\ HttpKernel "," short_class ":" HttpKernel "," class ":" Symfony \ Component \ HttpKernel \ HttpKernel "," type ":" -> "," function ":" handleRaw "," file ":" C:\ Users \ Jonny \ Desktop \ Workspace \ php \ documentarywire \ vendor \ symfony \ http-kernel \ HttpKernel.php "," line ": 68," args ": [[" object "," Symfony \ Component \ HttpFoundation \ Request ""], [" integer ", 1]]}, {" пространство имен ":" Symfony \ Component \ HttpKernel "," short_class ":" HttpKernel "," class ":" Symfony \ Component \ HttpKernel \ HttpKernel "," type "«:"->", "function": "handle", "file": "C: \ Users \ Jonny \ Desktop \ Workspace \ php \ documentarywire \ vendor \ symfony \ http-kernel \ Kernel.php", "line":198, "args": [["object", "Symfony \ Component \ HttpFoundation \ Request"], ["integer", 1], ["boolean", true]]}, {"namespace": "Symfony \ Component\ HttpKernel "," short_class ":" Kernel "," class ":" Symfony \ Component \ HttpKernel \ Kernel "," type ":" -> "," function ":" handle "," file ":" C:\ Users \ Jonny \ Desktop \ Workspace \ php \ documentarywire \ public \ index.php "," line ": 25," args ": [[" object "," Symfony \ Component \ HttpFoundation \ Request "]]}]}
.