Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / validator / Mapping / GenericMetadata.php
index ff1cb6d37f89e20d667bd011236f71771dd9e852..83099aa5e3762a3cd944f4fd1c03d52baad3d8a4 100644 (file)
@@ -114,8 +114,6 @@ class GenericMetadata implements MetadataInterface
      *  - {@link TraversalStrategy::IMPLICIT} if $traverse is enabled
      *  - {@link TraversalStrategy::NONE} if $traverse is disabled
      *
-     * @param Constraint $constraint The constraint to add
-     *
      * @return $this
      *
      * @throws ConstraintDefinitionException When trying to add the
@@ -131,7 +129,7 @@ class GenericMetadata implements MetadataInterface
             ));
         }
 
-        if ($constraint instanceof Valid) {
+        if ($constraint instanceof Valid && null === $constraint->groups) {
             $this->cascadingStrategy = CascadingStrategy::CASCADE;
 
             if ($constraint->traverse) {