Closed
Description
Symfony version(s) affected: 4.4+
Description
Using the static method Transport::fromDsn
we can't create a multiple transport (failover
or roundrobin
).
How to reproduce
<?php
use Symfony\Component\Mailer\Transport;
require_once __DIR__ . '/vendor/autoload.php';
$transport = Transport::fromDsn('failover(smtp://localhost:1025 smtp://localhost:1026)');
// Expected result:
// ----------------
// A FailoverTransport instance with 2 transports EsmtpTransport
// Actual result:
// -------------
// Uncaught Exception: Cannot rewind a generator that was already run in ... vendor/symfony/mailer/Transport.php:143