Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #35591 [Validator] do not merge constraints within interfaces (gr…
…eedyivan) This PR was merged into the 3.4 branch. Discussion ---------- [Validator] do not merge constraints within interfaces | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #22538 | License | MIT | Doc PR | This fix disables merge constraints within interfaces. There is no reason to merge constraints from one interface to another because each class merges the constraints of all its interfaces. Only one check is needed is to eliminate all interfaces that comes from parent class to avoid duplication. Commits ------- 67f336b do not merge constraints within interfaces
- Loading branch information
Showing
6 changed files
with
74 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/Symfony/Component/Validator/Tests/Fixtures/AbstractPropertyGetter.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Symfony\Component\Validator\Tests\Fixtures; | ||
|
||
abstract class AbstractPropertyGetter implements PropertyGetterInterface | ||
{ | ||
private $property; | ||
|
||
public function getProperty() | ||
{ | ||
return $this->property; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/Symfony/Component/Validator/Tests/Fixtures/ChildGetterInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
namespace Symfony\Component\Validator\Tests\Fixtures; | ||
|
||
interface ChildGetterInterface extends PropertyGetterInterface | ||
{ | ||
} |
12 changes: 12 additions & 0 deletions
12
src/Symfony/Component/Validator/Tests/Fixtures/PropertyGetter.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Symfony\Component\Validator\Tests\Fixtures; | ||
|
||
/** | ||
* This class has two paths to PropertyGetterInterface: | ||
* PropertyGetterInterface <- AbstractPropertyGetter <- PropertyGetter | ||
* PropertyGetterInterface <- ChildGetterInterface <- PropertyGetter | ||
*/ | ||
class PropertyGetter extends AbstractPropertyGetter implements ChildGetterInterface | ||
{ | ||
} |
8 changes: 8 additions & 0 deletions
8
src/Symfony/Component/Validator/Tests/Fixtures/PropertyGetterInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Symfony\Component\Validator\Tests\Fixtures; | ||
|
||
interface PropertyGetterInterface | ||
{ | ||
public function getProperty(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters