8000 [BC Break][Validation] Revert #19388 by peterrehm · Pull Request #20857 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[BC Break][Validation] Revert #19388 #20857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Revert #19388
  • Loading branch information
peterrehm committed Dec 10, 2016
commit 2387cfb9a402b6f7ed8dc6dfbb2f23de5f5dfe57
1 change: 0 additions & 1 deletion src/Symfony/Component/Validator/Mapping/ClassMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ public function mergeConstraints(ClassMetadata $source)
$member = clone $member;

foreach ($member->getConstraints() as $constraint) {
$member->constraintsByGroup[$this->getDefaultGroup()][] = $constraint;
$constraint->addImplicitGroupName($this->getDefaultGroup());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,26 +153,11 @@ public function testMergeConstraintsMergesMemberConstraints()
$constraintA2,
);

$constraintsByGroup = array(
'Default' => array(
$constraintA1,
$constraintA2,
),
'EntityParent' => array(
$constraintA1,
),
'Entity' => array(
$constraintA1,
$constraintA2,
),
);

$members = $this->metadata->getPropertyMetadata('firstName');

$this->assertCount(1, $members);
$this->assertEquals(self::PARENTCLASS, $members[0]->getClassName());
$this->assertEquals($constraints, $members[0]->getConstraints());
$this->assertEquals($constraintsByGroup, $members[0]->constraintsByGroup);
}

public function testMemberMetadatas()
Expand Down
0