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

@ -17,8 +17,6 @@ use Symfony\Component\Validator\ConstraintViolationListInterface;
/**
* A validator in a specific execution context.
*
* @since 2.5
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
interface ContextualValidatorInterface
@ -31,7 +29,7 @@ interface ContextualValidatorInterface
*
* @param string $path The path to append
*
* @return ContextualValidatorInterface This validator
* @return $this
*/
public function atPath($path);
@ -48,7 +46,7 @@ interface ContextualValidatorInterface
* validate. If none is given,
* "Default" is assumed
*
* @return ContextualValidatorInterface This validator
* @return $this
*/
public function validate($value, $constraints = null, $groups = null);
@ -61,7 +59,7 @@ interface ContextualValidatorInterface
* @param array|null $groups The validation groups to validate. If
* none is given, "Default" is assumed
*
* @return ContextualValidatorInterface This validator
* @return $this
*/
public function validateProperty($object, $propertyName, $groups = null);
@ -76,7 +74,7 @@ interface ContextualValidatorInterface
* @param array|null $groups The validation groups to validate. If
* none is given, "Default" is assumed
*
* @return ContextualValidatorInterface This validator
* @return $this
*/
public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null);

View file

@ -16,8 +16,6 @@ namespace Symfony\Component\Validator\Validator;
/**
* A validator that supports both the API of Symfony < 2.5 and Symfony 2.5+.
*
* @since 2.5
*
* @author Bernhard Schussek <bschussek@gmail.com>
*
* @see \Symfony\Component\Validator\ValidatorInterface

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

View file

@ -24,8 +24,6 @@ use Symfony\Component\Validator\ValidatorInterface as LegacyValidatorInterface;
/**
* Recursive implementation of {@link ValidatorInterface}.
*
* @since 2.5
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
class RecursiveValidator implements ValidatorInterface, LegacyValidatorInterface

View file

@ -19,8 +19,6 @@ use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface;
/**
* Validates PHP values against constraints.
*
* @since 2.5
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
interface ValidatorInterface extends MetadataFactoryInterface
@ -38,7 +36,7 @@ interface ValidatorInterface extends MetadataFactoryInterface
* validate. If none is given,
* "Default" is assumed
*
* @return ConstraintViolationListInterface A list of constraint violations.
* @return ConstraintViolationListInterface A list of constraint violations
* If the list is empty, validation
* succeeded
*/
@ -53,7 +51,7 @@ interface ValidatorInterface extends MetadataFactoryInterface
* @param array|null $groups The validation groups to validate. If
* none is given, "Default" is assumed
*
* @return ConstraintViolationListInterface A list of constraint violations.
* @return ConstraintViolationListInterface A list of constraint violations
* If the list is empty, validation
* succeeded
*/
@ -70,7 +68,7 @@ interface ValidatorInterface extends MetadataFactoryInterface
* @param array|null $groups The validation groups to validate. If
* none is given, "Default" is assumed
*
* @return ConstraintViolationListInterface A list of constraint violations.
* @return ConstraintViolationListInterface A list of constraint violations
* If the list is empty, validation
* succeeded
*/