You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to upgrade to Version 7.3.0 and get the following error: "Too few arguments to function App\Validator\ProductValidator::__construct(), 0 passed in Projects/app/vendor/symfony/validator/ContainerConstraintValidatorFactory.php on line 49 and exactly 1 expected"
How to reproduce
My Constructor for my ProductValidator looks these:
public function __construct(public EntityManagerInterface $entityManager)
{
}
The validator is called as assert via attributes in my DTO:
Had one #[\Attribute] too many in my validator service (also in the class that extends the ConstraintValidator). This does not seem to have been a problem in versions lower than 7.3, and has now led to this error when upgrading to 7.3.
Symfony version(s) affected
7.3.0
Description
Trying to upgrade to Version 7.3.0 and get the following error: "Too few arguments to function App\Validator\ProductValidator::__construct(), 0 passed in Projects/app/vendor/symfony/validator/ContainerConstraintValidatorFactory.php on line 49 and exactly 1 expected"
How to reproduce
My Constructor for my ProductValidator looks these:
The validator is called as assert via attributes in my DTO:
And validated here:
Possible Solution
No response
Additional Context
In previous version this has worked. Has anything changed here?
The text was updated successfully, but these errors were encountered: