Skip to content

Commit 52d3de5

Browse files
committed
[Uid] Removed Uuuid generator classes
1 parent 57b7b39 commit 52d3de5

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

components/uid.rst

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -151,39 +151,9 @@ type, which converts to/from UUID objects automatically::
151151
// ...
152152
}
153153

154-
There's also a Doctrine generator to help autogenerate UUID values for the
155-
entity primary keys::
156-
157-
// there are generators for UUID V1 and V6 too
158-
use Symfony\Bridge\Doctrine\IdGenerator\UuidV4Generator;
159-
use Symfony\Component\Uid\Uuid;
160-
161-
/**
162-
* @ORM\Entity(repositoryClass="App\Repository\ProductRepository")
163-
*/
164-
class Product
165-
{
166-
/**
167-
* @ORM\Id
168-
* @ORM\Column(type="uuid", unique=true)
169-
* @ORM\GeneratedValue(strategy="CUSTOM")
170-
* @ORM\CustomIdGenerator(class=UuidV4Generator::class)
171-
*/
172-
private $id;
173-
174-
// ...
175-
176-
public function getId(): ?Uuid
177-
{
178-
return $this->id;
179-
}
180-
181-
// ...
182-
}
183-
184154
.. versionadded:: 5.2
185155

186-
The UUID type and generators were introduced in Symfony 5.2.
156+
The UUID type was introduced in Symfony 5.2.
187157

188158
When using built-in Doctrine repository methods (e.g. ``findOneBy()``), Doctrine
189159
knows how to convert these UUID types to build the SQL query

0 commit comments

Comments
 (0)