Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #20745 [Validator] add class name to the cache key (Simperfit)
This PR was squashed before being merged into the 3.1 branch (closes #20745). Discussion ---------- [Validator] add class name to the cache key | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #20685 | License | MIT | Doc PR | Adding the class name to the cache key to avoid collision Commits ------- 1681fc9 [Validator] add class name to the cache key
- Loading branch information
Showing
6 changed files
with
148 additions
and
3 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
src/Symfony/Component/Validator/Tests/Constraints/Fixtures/ChildA.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,30 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Validator\Tests\Constraints\Fixtures; | ||
|
||
use Symfony\Component\Validator\Constraints as Assert; | ||
|
||
class ChildA | ||
{ | ||
/** | ||
* @Assert\Valid | ||
* @Assert\NotNull | ||
* @Assert\NotBlank | ||
*/ | ||
public $name; | ||
/** | ||
* @var ChildB | ||
* @Assert\Valid | ||
* @Assert\NotNull | ||
*/ | ||
public $childB; | ||
} |
29 changes: 29 additions & 0 deletions
29
src/Symfony/Component/Validator/Tests/Constraints/Fixtures/ChildB.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,29 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Validator\Tests\Constraints\Fixtures; | ||
|
||
use Symfony\Component\Validator\Constraints as Assert; | ||
|
||
class ChildB | ||
{ | ||
/** | ||
* @Assert\Valid | ||
* @Assert\NotBlank | ||
*/ | ||
public $name; | ||
/** | ||
* @var ChildA | ||
* @Assert\Valid | ||
* @Assert\NotBlank | ||
*/ | ||
public $childA; | ||
} |
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
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
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
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