- /**
- * Wrapper for {@link ExecutionContextInterface::buildViolation} that
- * supports the 2.4 context API.
- *
- * @param string $message The violation message
- * @param array $parameters The message parameters
- *
- * @return ConstraintViolationBuilderInterface The violation builder
- *
- * @deprecated since version 2.5, to be removed in 3.0.
- */
- protected function buildViolation($message, array $parameters = array())
- {
- @trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
-
- if ($this->context instanceof ExecutionContextInterface2Dot5) {
- return $this->context->buildViolation($message, $parameters);
- }
-
- return new LegacyConstraintViolationBuilder($this->context, $message, $parameters);
- }
-
- /**
- * Wrapper for {@link ExecutionContextInterface::buildViolation} that
- * supports the 2.4 context API.
- *
- * @param ExecutionContextInterface $context The context to use
- * @param string $message The violation message
- * @param array $parameters The message parameters
- *
- * @return ConstraintViolationBuilderInterface The violation builder
- *
- * @deprecated since version 2.5, to be removed in 3.0.
- */
- protected function buildViolationInContext(ExecutionContextInterface $context, $message, array $parameters = array())
- {
- @trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
-
- if ($context instanceof ExecutionContextInterface2Dot5) {
- return $context->buildViolation($message, $parameters);
- }
-
- return new LegacyConstraintViolationBuilder($context, $message, $parameters);
- }
-