diff --git a/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php b/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php index fac864d..6ea8d4f 100644 --- a/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php +++ b/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php @@ -104,8 +104,12 @@ class SymfonyConstraintAnnotationReader /** * Append the pattern from the constraint to the existing pattern. */ - private function appendPattern(Schema $property, string $newPattern) + private function appendPattern(Schema $property, $newPattern) { + if (null === $newPattern) { + return; + } + if (null !== $property->getPattern()) { $property->setPattern(sprintf('%s, %s', $property->getPattern(), $newPattern)); } else {