Updating Media dependent modules to versions compatible with core Media.
[yaffs-website] / vendor / symfony / validator / Mapping / MemberMetadata.php
index 0def248431f2dc9d7e0205efed48298d3a5fcd41..d71a13be71f03f92f79850b32feb64664bad0bbb 100644 (file)
@@ -13,7 +13,6 @@ namespace Symfony\Component\Validator\Mapping;
 
 use Symfony\Component\Validator\Constraint;
 use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
-use Symfony\Component\Validator\ValidationVisitorInterface;
 
 /**
  * Stores all metadata needed for validating a class property.
@@ -27,11 +26,9 @@ use Symfony\Component\Validator\ValidationVisitorInterface;
  *
  * @see PropertyMetadataInterface
  */
-abstract class MemberMetadata extends ElementMetadata implements PropertyMetadataInterface
+abstract class MemberMetadata extends GenericMetadata implements PropertyMetadataInterface
 {
     /**
-     * @var string
-     *
      * @internal This property is public in order to reduce the size of the
      *           class' serialized representation. Do not access it. Use
      *           {@link getClassName()} instead.
@@ -39,8 +36,6 @@ abstract class MemberMetadata extends ElementMetadata implements PropertyMetadat
     public $class;
 
     /**
-     * @var string
-     *
      * @internal This property is public in order to reduce the size of the
      *           class' serialized representation. Do not access it. Use
      *           {@link getName()} instead.
@@ -48,8 +43,6 @@ abstract class MemberMetadata extends ElementMetadata implements PropertyMetadat
     public $name;
 
     /**
-     * @var string
-     *
      * @internal This property is public in order to reduce the size of the
      *           class' serialized representation. Do not access it. Use
      *           {@link getPropertyName()} instead.
@@ -62,8 +55,6 @@ abstract class MemberMetadata extends ElementMetadata implements PropertyMetadat
     private $reflMember = array();
 
     /**
-     * Constructor.
-     *
      * @param string $class    The name of the class this member is defined on
      * @param string $name     The name of the member
      * @param string $property The property the member belongs to
@@ -75,22 +66,6 @@ abstract class MemberMetadata extends ElementMetadata implements PropertyMetadat
         $this->property = $property;
     }
 
-    /**
-     * {@inheritdoc}
-     *
-     * @deprecated since version 2.5, to be removed in 3.0.
-     */
-    public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath, $propagatedGroup = null)
-    {
-        @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
-
-        $visitor->visit($this, $value, $group, $propertyPath);
-
-        if ($this->isCascaded()) {
-            $visitor->validate($value, $propagatedGroup ?: $group, $propertyPath, $this->isCollectionCascaded(), $this->isCollectionCascadedDeeply());
-        }
-    }
-
     /**
      * {@inheritdoc}
      */
@@ -182,53 +157,6 @@ abstract class MemberMetadata extends ElementMetadata implements PropertyMetadat
         return $this->getReflectionMember($objectOrClassName)->isPrivate();
     }
 
-    /**
-     * Returns whether objects stored in this member should be validated.
-     *
-     * @return bool
-     *
-     * @deprecated since version 2.5, to be removed in 3.0.
-     *             Use {@link getCascadingStrategy()} instead.
-     */
-    public function isCascaded()
-    {
-        @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the getCascadingStrategy() method instead.', E_USER_DEPRECATED);
-
-        return (bool) ($this->cascadingStrategy & CascadingStrategy::CASCADE);
-    }
-
-    /**
-     * Returns whether arrays or traversable objects stored in this member
-     * should be traversed and validated in each entry.
-     *
-     * @return bool
-     *
-     * @deprecated since version 2.5, to be removed in 3.0.
-     *             Use {@link getTraversalStrategy()} instead.
-     */
-    public function isCollectionCascaded()
-    {
-        @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the getTraversalStrategy() method instead.', E_USER_DEPRECATED);
-
-        return (bool) ($this->traversalStrategy & (TraversalStrategy::IMPLICIT | TraversalStrategy::TRAVERSE));
-    }
-
-    /**
-     * Returns whether arrays or traversable objects stored in this member
-     * should be traversed recursively for inner arrays/traversable objects.
-     *
-     * @return bool
-     *
-     * @deprecated since version 2.5, to be removed in 3.0.
-     *             Use {@link getTraversalStrategy()} instead.
-     */
-    public function isCollectionCascadedDeeply()
-    {
-        @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the getTraversalStrategy() method instead.', E_USER_DEPRECATED);
-
-        return !($this->traversalStrategy & TraversalStrategy::STOP_RECURSION);
-    }
-
     /**
      * Returns the reflection instance for accessing the member's value.
      *