Issue #3255245 by Spokje, longwave, daffie, Gábor Hojtsy, Taran2L, murilohp:...
Issue #3255245 by Spokje, longwave, daffie, Gábor Hojtsy, Taran2L, murilohp: [Symfony 6] Revert 3231603 to use our own TranslatorInterface
(cherry picked from commit d28e89ba)
@trigger_error(__CLASS__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use the class \Symfony\Component\Validator\Violation\ConstraintViolationBuilder instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
$this->violations=$violations;
$this->message=$message;
$this->parameters=$parameters;
@@ -139,16 +134,9 @@ public function __construct(ConstraintViolationList $violations, Constraint $con
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Violation\ConstraintViolationBuilder::atPath() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Violation\ConstraintViolationBuilder::setParameter() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
$this->parameters[$key]=$value;
return$this;
@@ -173,16 +154,9 @@ public function setParameter($key, $value)
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Violation\ConstraintViolationBuilder::setParameters() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
$this->parameters=$parameters;
return$this;
@@ -190,16 +164,9 @@ public function setParameters(array $parameters)
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Violation\ConstraintViolationBuilder::setTranslationDomain() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
$this->translationDomain=$translationDomain;
return$this;
@@ -207,16 +174,9 @@ public function setTranslationDomain($translationDomain)
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Violation\ConstraintViolationBuilder::setInvalidValue() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
$this->invalidValue=$invalidValue;
return$this;
@@ -224,16 +184,9 @@ public function setInvalidValue($invalidValue)
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Violation\ConstraintViolationBuilder::setPlural() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
$this->plural=$number;
return$this;
@@ -241,16 +194,9 @@ public function setPlural($number)
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Violation\ConstraintViolationBuilder::setCode() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
$this->code=$code;
return$this;
@@ -258,16 +204,9 @@ public function setCode($code)
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Violation\ConstraintViolationBuilder::setCause() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
$this->cause=$cause;
return$this;
@@ -275,16 +214,9 @@ public function setCause($cause)
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Violation\ConstraintViolationBuilder::addViolation() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
@trigger_error(__CLASS__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use the class \Symfony\Component\Validator\Context\ExecutionContext instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
$this->validator=$validator;
$this->root=$root;
$this->translator=$translator;
@@ -137,15 +131,8 @@ public function __construct(ValidatorInterface $validator, $root, TranslatorInte
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::setNode() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
$this->value=$value;
$this->data=$object;
$this->metadata=$metadata;
@@ -154,43 +141,22 @@ public function setNode($value, $object, MetadataInterface $metadata = NULL, $pr
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::setGroup() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
$this->group=$group;
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::setConstraint() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
$this->constraint=$constraint;
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::addViolation() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
// 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.
@@ -203,295 +169,148 @@ public function addViolation($message, array $parameters = [], $invalidValue = N
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::buildViolation() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::getViolations() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
return$this->violations;
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::getValidator() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
return$this->validator;
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::getRoot() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
return$this->root;
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::getValue() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
return$this->value;
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::getObject() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
return$this->data;
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::getMetadata() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
return$this->metadata;
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::getGroup() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
returnConstraint::DEFAULT_GROUP;
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::getClassName() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
returnget_class($this->data);
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::getPropertyName() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
return$this->data->getName();
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::getPropertyPath() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::addViolationAt() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
thrownew\LogicException('Legacy validator API is unsupported.');
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::validate() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
thrownew\LogicException('Legacy validator API is unsupported.');
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::markConstraintAsValidated() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::isConstraintValidated() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::validateValue() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
thrownew\LogicException('Legacy validator API is unsupported.');
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::markGroupAsValidated() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::isGroupValidated() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::markObjectAsInitialized() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
// Not supported, so nothing todo.
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::isObjectInitialized() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
// Not supported, so nothing todo.
}
/**
* {@inheritdoc}
*
* @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use
@trigger_error(__METHOD__.' is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Symfony\Component\Validator\Context\ExecutionContext::getMetadataFactory() instead. See https://www.drupal.org/node/3238432',E_USER_DEPRECATED);
thrownew\LogicException('Legacy validator API is unsupported.');