jjzjj

CharacterInformation

全部标签

php - 交响乐 4 : "Autowire: you should configure its value explicitly."

我开始使用Symfony4,当我尝试运行我的服务器时遇到以下错误:无法Autowiring服务“App\Controller\CharacterInformation”:方法“__construct()"是类型提示的“字符串”,您应该明确配置它的值。我如何实例化我的类:/***@Route("/")*@returnResponse*/functionmainPage(){$characterInformation=newCharacterInformation('eu');returnnewResponse($characterInformation->getCharacter());