Skip to content

Commit e62b565

Browse files
committed
minor #14054 Update custom-transport.rst (andreybolonin)
This PR was squashed before being merged into the 5.1 branch. Discussion ---------- Update custom-transport.rst <!-- 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 `master` for features of unreleased versions). --> Commits ------- 8d28f6b Update custom-transport.rst
2 parents f8a15e7 + 8d28f6b commit e62b565

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

messenger/custom-transport.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The transport object needs to implement the
3535
and :class:`Symfony\\Component\\Messenger\\Transport\\Receiver\\ReceiverInterface`).
3636
Here is a simplified example of a database transport::
3737

38-
use Ramsey\Uuid\Uuid;
38+
use Symfony\Component\Uid\Uuid;
3939
use Symfony\Component\Messenger\Envelope;
4040
use Symfony\Component\Messenger\Stamp\TransportMessageIdStamp;
4141
use Symfony\Component\Messenger\Transport\Serialization\PhpSerializer;
@@ -108,8 +108,7 @@ Here is a simplified example of a database transport::
108108
public function send(Envelope $envelope): Envelope
109109
{
110110
$encodedMessage = $this->serializer->encode($envelope);
111-
$uuid = Uuid::uuid4()->toString();
112-
111+
$uuid = (string) Uuid::v4();
113112
// Add a message to the "my_queue" table
114113
$this->db->createQuery(
115114
'INSERT INTO my_queue (id, envelope, delivered_at, handled)

0 commit comments

Comments
 (0)