Issue #3258407 by longwave: Remove unused Symfony 2.x methods from ExecutionContext

merge-requests/3650/head^2
catch 2023-04-04 18:10:53 +01:00
parent 48e054923a
commit 724c552175
1 changed files with 1 additions and 36 deletions

View File

@ -157,14 +157,7 @@ class ExecutionContext implements ExecutionContextInterface {
/**
* {@inheritdoc}
*/
public function addViolation($message, array $parameters = [], $invalidValue = NULL, $plural = NULL, $code = NULL) {
// The parameters $invalidValue and following are ignored by the new
// API, as they are not present in the new interface anymore.
// You should use buildViolation() instead.
if (func_num_args() > 2) {
throw new \LogicException('Legacy validator API is unsupported.');
}
public function addViolation($message, array $parameters = []) {
$this->violations->add(new ConstraintViolation($this->translator->trans($message, $parameters, $this->translationDomain), $message, $parameters, $this->root, $this->propertyPath, $this->value, NULL, NULL, $this->constraint));
}
@ -245,20 +238,6 @@ class ExecutionContext implements ExecutionContextInterface {
return PropertyPath::append($this->propertyPath, $sub_path);
}
/**
* {@inheritdoc}
*/
public function addViolationAt($subPath, $message, array $parameters = [], $invalidValue = NULL, $plural = NULL, $code = NULL) {
throw new \LogicException('Legacy validator API is unsupported.');
}
/**
* {@inheritdoc}
*/
public function validate($value, $subPath = '', $groups = NULL, $traverse = FALSE, $deep = FALSE) {
throw new \LogicException('Legacy validator API is unsupported.');
}
/**
* {@inheritdoc}
*/
@ -273,13 +252,6 @@ class ExecutionContext implements ExecutionContextInterface {
return isset($this->validatedConstraints[$cache_key . ':' . $constraint_hash]);
}
/**
* {@inheritdoc}
*/
public function validateValue($value, $constraints, $subPath = '', $groups = NULL) {
throw new \LogicException('Legacy validator API is unsupported.');
}
/**
* {@inheritdoc}
*/
@ -308,11 +280,4 @@ class ExecutionContext implements ExecutionContextInterface {
throw new \LogicException('\Symfony\Component\Validator\Context\ExecutionContextInterface::isObjectInitialized is unsupported.');
}
/**
* {@inheritdoc}
*/
public function getMetadataFactory() {
throw new \LogicException('Legacy validator API is unsupported.');
}
}