admin管理员组文章数量:1347691
Created a class CorrespondenceLanguageValidator
which extends Symfony\Component\Validator\ConstraintValidator
Then I tried to import a class to this validator class using dependency injection using
public function __construct(private ClubService $clubService)
{
}
but always getting the error
Too few arguments to function Fsa\ApiV2Bundle\Validator\ContactField\Constraints\CorrespondenceLanguageValidator::__construct(), 0 passed in /var/www/html/fg-internal-api/vendor/symfony/validator/ConstraintValidatorFactory.php on line 40 and exactly 1 expected
本文标签: Autowiring services failed in PHP Symfony ConstraintValidatorStack Overflow
版权声明:本文标题:Autowiring services failed in PHP Symfony ConstraintValidator - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743837977a2547756.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论