最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Autowiring services failed in PHP Symfony ConstraintValidator - Stack Overflow

programmeradmin2浏览0评论

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

发布评论

评论列表(0)

  1. 暂无评论