// for the class, if applicable.
// This is done after checking the cache, so that
// spl_object_hash() isn't called for this sequence and
// "Default" is used instead in the cache. This is useful
// if the getters below return different group sequences in
// every call.
if (Constraint::DEFAULT_GROUP ===
$group) { if ($metadata->
hasGroupSequence()) { // The group sequence is statically defined for the class
$group =
$metadata->
getGroupSequence();
$defaultOverridden = true;
} elseif ($metadata->
isGroupSequenceProvider()) { // The group sequence is dynamically obtained from the validated
// object
/* @var \Symfony\Component\Validator\GroupSequenceProviderInterface $object */
$group =
$object->
getGroupSequence();
$defaultOverridden = true;
if (!
$group instanceof GroupSequence
) { $group =
new GroupSequence($group);
} } }