Skip to content

Commit e12d696

Browse files
committed
minor #14975 [Validator] Use import instead of FQCN (wkania)
This PR was merged into the 5.2 branch. Discussion ---------- [Validator] Use import instead of FQCN <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `5.x` for features of unreleased versions). --> Commits ------- feb165e [Validator] Use import instead of FQCN
2 parents c4d8733 + feb165e commit e12d696

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

reference/constraints/Type.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,12 @@ This will check if ``id`` is an instance of ``Ramsey\Uuid\UuidInterface``,
6464
// src/Entity/Author.php
6565
namespace App\Entity;
6666
67+
use Ramsey\Uuid\UuidInterface;
6768
use Symfony\Component\Validator\Constraints as Assert;
6869
6970
class Author
7071
{
71-
#[Assert\Type('Ramsey\Uuid\UuidInterface')]
72+
#[Assert\Type(UuidInterface::class)]
7273
protected $id;
7374
7475
#[Assert\Type('string')]

0 commit comments

Comments
 (0)