mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-28 01:25:00 +00:00
Replace value
with canonical
in PersonIdentifier
unique constraint, repository logic, and tests
- Update unique constraint on `PersonIdentifier` to use `canonical` instead of `value`. - Refactor repository method `findByDefinitionAndValue` to `findByDefinitionAndCanonical`, updating logic accordingly. - Adjust validation logic in `UniqueIdentifierConstraintValidator` to align with the new canonical-based approach. - Modify related integration and unit tests to support the changes. - Inject `PersonIdentifierManagerInterface` into the repository to handle canonical value generation.
This commit is contained in:
@@ -19,9 +19,11 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final readonly class StringIdentifier implements PersonIdentifierEngineInterface
|
||||
{
|
||||
public const NAME = 'chill-person-bundle.string-identifier';
|
||||
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'chill-person-bundle.string-identifier';
|
||||
return self::NAME;
|
||||
}
|
||||
|
||||
public function canonicalizeValue(array $value, PersonIdentifierDefinition $definition): ?string
|
||||
|
Reference in New Issue
Block a user