diff --git a/CHANGELOG.md b/CHANGELOG.md index 08efefd..5c41e99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +3.8.0 +------ + +* remove pattern added from the Expression Violation message. + 3.7.0 (unreleased) ------------------ diff --git a/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php b/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php index 73f8449..f944ee0 100644 --- a/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php +++ b/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php @@ -69,8 +69,6 @@ class SymfonyConstraintAnnotationReader } elseif ($annotation instanceof Assert\Choice) { $values = $annotation->callback ? call_user_func(is_array($annotation->callback) ? $annotation->callback : [$reflectionProperty->class, $annotation->callback]) : $annotation->choices; $property->setEnum(array_values($values)); - } elseif ($annotation instanceof Assert\Expression) { - $this->appendPattern($property, $annotation->message); } elseif ($annotation instanceof Assert\Range) { $property->setMinimum($annotation->min); $property->setMaximum($annotation->max); diff --git a/Tests/Describer/ApiPlatformDescriberTest.php b/Tests/Describer/ApiPlatformDescriberTest.php index 5e83a03..dacfb53 100644 --- a/Tests/Describer/ApiPlatformDescriberTest.php +++ b/Tests/Describer/ApiPlatformDescriberTest.php @@ -45,7 +45,7 @@ class ApiPlatformDescriberTest extends AbstractDescriberTest $this->assertEquals($expectedApi->toArray(), $this->getSwaggerDoc()->toArray()); } - protected function setUp() + protected function setUp(): void { $this->documentation = new Documentation(new ResourceNameCollection(['dummy' => 'dummy'])); diff --git a/Tests/Functional/FunctionalTest.php b/Tests/Functional/FunctionalTest.php index 0e18c3f..7d2db9a 100644 --- a/Tests/Functional/FunctionalTest.php +++ b/Tests/Functional/FunctionalTest.php @@ -366,7 +366,6 @@ class FunctionalTest extends WebTestCase ], 'propertyExpression' => [ 'type' => 'integer', - 'pattern' => 'If this is a tech post, the category should be either php or symfony!', ], 'propertyRange' => [ 'type' => 'integer',