Skip to content

Commit 77aed83

Browse files
Merge branch '5.0'
* 5.0: Use PHP 7.2 minimum in tests run with github actions Fix exception messages containing exception messages
2 parents 3ac6c23 + 2ad197a commit 77aed83

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Constraints/AbstractComparisonValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function validate($value, Constraint $constraint)
5555
try {
5656
$comparedValue = $this->getPropertyAccessor()->getValue($object, $path);
5757
} catch (NoSuchPropertyException $e) {
58-
throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: '.$e->getMessage(), $path, get_debug_type($constraint)), 0, $e);
58+
throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: ', $path, get_debug_type($constraint)).$e->getMessage(), 0, $e);
5959
}
6060
} else {
6161
$comparedValue = $constraint->value;

Constraints/BicValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function validate($value, Constraint $constraint)
130130
try {
131131
$iban = $this->getPropertyAccessor()->getValue($object, $path);
132132
} catch (NoSuchPropertyException $e) {
133-
throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: '.$e->getMessage(), $path, get_debug_type($constraint)), 0, $e);
133+
throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: ', $path, get_debug_type($constraint)).$e->getMessage(), 0, $e);
134134
}
135135
}
136136
if (!$iban) {

Constraints/RangeValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ private function getLimit($propertyPath, $default, Constraint $constraint)
157157
try {
158158
return $this->getPropertyAccessor()->getValue($object, $propertyPath);
159159
} catch (NoSuchPropertyException $e) {
160-
throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: '.$e->getMessage(), $propertyPath, get_debug_type($constraint)), 0, $e);
160+
throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: ', $propertyPath, get_debug_type($constraint)).$e->getMessage(), 0, $e);
161161
}
162162
}
163163

Mapping/Loader/YamlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ private function parseFile(string $path): array
114114
try {
115115
$classes = $this->yamlParser->parseFile($path, Yaml::PARSE_CONSTANT);
116116
} catch (ParseException $e) {
117-
throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML', $path).': '.$e->getMessage(), 0, $e);
117+
throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML: ', $path).$e->getMessage(), 0, $e);
118118
}
119119

120120
// empty file

0 commit comments

Comments
 (0)