Skip to content

Commit 31c4198

Browse files
committed
minor symfony#59195 [Mailer] fix NativeTransportFactoryTest (xabbuh)
This PR was merged into the 7.3 branch. Discussion ---------- [Mailer] fix NativeTransportFactoryTest | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT This is required as the `ini_set()` function is overwritten in the test to simulate a not-configured `sendmail_path` option. This partially reverts symfony#59173. Even if this violates our coding standards we have to keep it this way until we find another solution for the test. Commits ------- 7162f0f fix NativeTransportFactoryTest
2 parents 01956e2 + 7162f0f commit 31c4198

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Mailer/Transport/NativeTransportFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function create(Dsn $dsn): TransportInterface
2929
throw new UnsupportedSchemeException($dsn, 'native', $this->getSupportedSchemes());
3030
}
3131

32-
if ($sendMailPath = \ini_get('sendmail_path')) {
32+
if ($sendMailPath = ini_get('sendmail_path')) {
3333
return new SendmailTransport($sendMailPath, $this->dispatcher, $this->logger);
3434
}
3535

@@ -39,8 +39,8 @@ public function create(Dsn $dsn): TransportInterface
3939

4040
// Only for windows hosts; at this point non-windows
4141
// host have already thrown an exception or returned a transport
42-
$host = \ini_get('SMTP');
43-
$port = (int) \ini_get('smtp_port');
42+
$host = ini_get('SMTP');
43+
$port = (int) ini_get('smtp_port');
4444

4545
if (!$host || !$port) {
4646
throw new TransportException('smtp or smtp_port is not configured in php.ini.');

0 commit comments

Comments
 (0)