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
in order to check that all field names passed exist.
The repository method can be overriden in the constraint to use something else than findBy,
as a first step we could ignore constraint with an overridden method.
@ondrejmirtes I know it's a Symfony constraint, but since it requires objectManagerLoader to have class metadata I think it's more an issue for phpstan-doctrine or phpstan-symfony.
The text was updated successfully, but these errors were encountered:
Symfony provides a UniqueEntity annotation
https://symfony.com/doc/current/reference/constraints/UniqueEntity.html
The first arguments need to be entity fields, which will be use by a
findBy
call (by default).So a rule could be implemented, similar to
phpstan-doctrine/src/Rules/Doctrine/ORM/RepositoryMethodCallRule.php
Line 19 in 0871900
in order to check that all field names passed exist.
The repository method can be overriden in the constraint to use something else than
findBy
,as a first step we could ignore constraint with an overridden method.
@ondrejmirtes I know it's a Symfony constraint, but since it requires
objectManagerLoader
to have class metadata I think it's more an issue for phpstan-doctrine or phpstan-symfony.The text was updated successfully, but these errors were encountered: