Update to Drupal 8.2.6. For more information, see https://www.drupal.org/project/drupal/releases/8.2.6

This commit is contained in:
Pantheon Automation 2017-02-02 16:28:38 -08:00 committed by Greg Anderson
parent db56c09587
commit f1e72395cb
588 changed files with 26857 additions and 2777 deletions

View file

@ -14,6 +14,7 @@ namespace Symfony\Component\Validator\Validator;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Constraints\GroupSequence;
use Symfony\Component\Validator\ConstraintValidatorFactoryInterface;
use Symfony\Component\Validator\Context\ExecutionContext;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
use Symfony\Component\Validator\Exception\NoSuchMetadataException;
@ -33,8 +34,6 @@ use Symfony\Component\Validator\Util\PropertyPath;
/**
* Recursive implementation of {@link ContextualValidatorInterface}.
*
* @since 2.5
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
class RecursiveContextualValidator implements ContextualValidatorInterface
@ -112,6 +111,11 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
$previousMetadata = $this->context->getMetadata();
$previousPath = $this->context->getPropertyPath();
$previousGroup = $this->context->getGroup();
$previousConstraint = null;
if ($this->context instanceof ExecutionContext || method_exists($this->context, 'getConstraint')) {
$previousConstraint = $this->context->getConstraint();
}
// If explicit constraints are passed, validate the value against
// those constraints
@ -140,6 +144,10 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
$this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath);
$this->context->setGroup($previousGroup);
if (null !== $previousConstraint) {
$this->context->setConstraint($previousConstraint);
}
return $this;
}
@ -316,6 +324,7 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
return array($groups);
}
/**
* Validates an object against the constraints defined for its class.
*
@ -737,9 +746,7 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
// The $cascadedGroups property is set, if the "Default" group is
// overridden by a group sequence
// See validateClassNode()
$cascadedGroups = count($cascadedGroups) > 0
? $cascadedGroups
: $groups;
$cascadedGroups = null !== $cascadedGroups && count($cascadedGroups) > 0 ? $cascadedGroups : $groups;
if (is_array($value)) {
// Arrays are always traversed, independent of the specified
@ -792,7 +799,7 @@ class RecursiveContextualValidator implements ContextualValidatorInterface
* @param int $traversalStrategy The strategy used for
* traversing the value
* @param GroupSequence $groupSequence The group sequence
* @param string[]|null $cascadedGroup The group that should
* @param string|null $cascadedGroup The group that should
* be passed to cascaded
* objects instead of
* the group sequence