reverted: --- b/core/lib/Drupal/Core/TypedData/Validation/PropertyContainerMetadata.php +++ a/core/lib/Drupal/Core/TypedData/Validation/PropertyContainerMetadata.php @@ -9,13 +9,13 @@ use Drupal\Core\TypedData\ComplexDataInterface; use Drupal\Core\TypedData\ListInterface; +use Symfony\Component\Validator\PropertyMetadataContainerInterface; -use Symfony\Component\Validator\Mapping\ClassMetadataInterface; use Symfony\Component\Validator\ValidationVisitorInterface; /** * Typed data implementation of the validator MetadataInterface. */ +class PropertyContainerMetadata extends Metadata implements PropertyMetadataContainerInterface { -class PropertyContainerMetadata extends Metadata implements ClassMetadataInterface { /** * Overrides Metadata::accept(). @@ -65,63 +65,4 @@ throw new \LogicException("There are no known properties."); } } - - /** - * {@inheritdoc} - */ - public function getClassName() - { - // TODO: Implement getClassName() method. - } - - /** - * {@inheritdoc} - */ - public function getConstrainedProperties() - { - // TODO: Implement getConstrainedProperties() method. - } - - /** - * {@inheritdoc} - */ - public function hasGroupSequence() - { - // TODO: Implement hasGroupSequence() method. - } - - /** - * {@inheritdoc} - */ - public function getGroupSequence() - { - // TODO: Implement getGroupSequence() method. - } - - /** - * {@inheritdoc} - */ - public function isGroupSequenceProvider() - { - // TODO: Implement isGroupSequenceProvider() method. - } - - /** - * {@inheritdoc} - */ - public function getCascadingStrategy() - { - // TODO: Implement getCascadingStrategy() method. - } - - /** - * {@inheritdoc} - */ - public function getTraversalStrategy() - { - // TODO: Implement getTraversalStrategy() method. - } - - } - only in patch2: unchanged: --- a/core/lib/Drupal/Core/TypedData/Validation/PropertyContainerMetadata.php +++ b/core/lib/Drupal/Core/TypedData/Validation/ClassMetadata.php @@ -2,20 +2,20 @@ /** * @file - * Contains \Drupal\Core\TypedData\Validation\PropertyContainerMetadata. + * Contains \Drupal\Core\TypedData\Validation\ClassMetadata. */ namespace Drupal\Core\TypedData\Validation; use Drupal\Core\TypedData\ComplexDataInterface; use Drupal\Core\TypedData\ListInterface; -use Symfony\Component\Validator\PropertyMetadataContainerInterface; +use Symfony\Component\Validator\Mapping\ClassMetadataInterface; use Symfony\Component\Validator\ValidationVisitorInterface; /** * Typed data implementation of the validator MetadataInterface. */ -class PropertyContainerMetadata extends Metadata implements PropertyMetadataContainerInterface { +class ClassMetadata extends Metadata implements ClassMetadataInterface { /** * Overrides Metadata::accept(). @@ -65,4 +65,62 @@ public function getPropertyMetadata($property_name) { throw new \LogicException("There are no known properties."); } } + + /** + * {@inheritdoc} + */ + public function getClassName() { + // TODO: Implement getClassName() method. + } + + /** + * {@inheritdoc} + */ + public function getConstraints() { + // TODO: Implement getClassName() method. + } + + /** + * {@inheritdoc} + */ + public function getConstrainedProperties() { + // TODO: Implement getConstrainedProperties() method. + } + + /** + * {@inheritdoc} + */ + public function hasGroupSequence() { + // TODO: Implement hasGroupSequence() method. + } + + /** + * {@inheritdoc} + */ + public function getGroupSequence() { + // TODO: Implement getGroupSequence() method. + } + + /** + * {@inheritdoc} + */ + public function isGroupSequenceProvider() { + // TODO: Implement isGroupSequenceProvider() method. + } + + /** + * {@inheritdoc} + */ + public function getCascadingStrategy() { + // TODO: Implement getCascadingStrategy() method. + } + + /** + * {@inheritdoc} + */ + public function getTraversalStrategy() { + // TODO: Implement getTraversalStrategy() method. + } + + } only in patch2: unchanged: --- a/core/lib/Drupal/Core/TypedData/Validation/MetadataFactory.php +++ b/core/lib/Drupal/Core/TypedData/Validation/MetadataFactory.php @@ -31,7 +31,7 @@ public function getMetadataFor($typed_data, $name = '') { throw new \InvalidArgumentException('The passed value must be a typed data object.'); } $is_container = $typed_data instanceof ComplexDataInterface || $typed_data instanceof ListInterface; - $class = '\Drupal\Core\TypedData\Validation\\' . ($is_container ? 'PropertyContainerMetadata' : 'Metadata'); + $class = '\Drupal\Core\TypedData\Validation\\' . ($is_container ? 'ClassMetadata' : 'Metadata'); return new $class($typed_data, $name, $this); } only in patch2: unchanged: --- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ComplexDataConstraintValidator.php +++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ComplexDataConstraintValidator.php @@ -38,7 +38,7 @@ public function validate($value, Constraint $constraint) { $property = $property->getValue(); } elseif ($property->isEmpty()) { - // @see \Drupal\Core\TypedData\Validation\PropertyContainerMetadata::accept(); + // @see \Drupal\Core\TypedData\Validation\ClassMetadata::accept(); $property = NULL; } $this->context->validateValue($property, $constraints, $name, $group);