Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c8bba75

Browse filesBrowse files
committed
feature #42695 [Mailer] Restore Transport signatures (derrabus)
This PR was merged into the 6.0 branch. Discussion ---------- [Mailer] Restore Transport signatures | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Follow-up to #42662 | License | MIT | Doc PR | N/A Commits ------- 0d589b9 [Mailer] Restore Transport signatures
2 parents 444d43f + 0d589b9 commit c8bba75
Copy full SHA for c8bba75

File tree

1 file changed

+4
-32
lines changed
Filter options

1 file changed

+4
-32
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Transport.php
+4-32Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@
3838
/**
3939
* @author Fabien Potencier <fabien@symfony.com>
4040
* @author Konstantin Myakshin <molodchick@gmail.com>
41-
*
42-
* @final since Symfony 5.4
4341
*/
44-
class Transport
42+
final class Transport
4543
{
4644
private const FACTORY_CLASSES = [
4745
GmailTransportFactory::class,
@@ -56,33 +54,15 @@ class Transport
5654

5755
private $factories;
5856

59-
/**
60-
* @param EventDispatcherInterface|null $dispatcher
61-
* @param HttpClientInterface|null $client
62-
* @param LoggerInterface|null $logger
63-
*/
64-
public static function fromDsn(string $dsn/*, EventDispatcherInterface $dispatcher = null, HttpClientInterface $client = null, LoggerInterface $logger = null*/): TransportInterface
57+
public static function fromDsn(string $dsn, EventDispatcherInterface $dispatcher = null, HttpClientInterface $client = null, LoggerInterface $logger = null): TransportInterface
6558
{
66-
$dispatcher = 2 <= \func_num_args() ? func_get_arg(1) : null;
67-
$client = 3 <= \func_num_args() ? func_get_arg(2) : null;
68-
$logger = 4 <= \func_num_args() ? func_get_arg(3) : null;
69-
7059
$factory = new self(iterator_to_array(self::getDefaultFactories($dispatcher, $client, $logger)));
7160

7261
return $factory->fromString($dsn);
7362
}
7463

75-
/**
76-
* @param EventDispatcherInterface|null $dispatcher
77-
* @param HttpClientInterface|null $client
78-
* @param LoggerInterface|null $logger
79-
*/
80-
public static function fromDsns(array $dsns/*, EventDispatcherInterface $dispatcher = null, HttpClientInterface $client = null, LoggerInterface $logger = null*/): TransportInterface
64+
public static function fromDsns(array $dsns, EventDispatcherInterface $dispatcher = null, HttpClientInterface $client = null, LoggerInterface $logger = null): TransportInterface
8165
{
82-
$dispatcher = 2 <= \func_num_args() ? func_get_arg(1) : null;
83-
$client = 3 <= \func_num_args() ? func_get_arg(2) : null;
84-
$logger = 4 <= \func_num_args() ? func_get_arg(3) : null;
85-
8666
$factory = new self(iterator_to_array(self::getDefaultFactories($dispatcher, $client, $logger)));
8767

8868
return $factory->fromStrings($dsns);
@@ -175,18 +155,10 @@ public function fromDsnObject(Dsn $dsn): TransportInterface
175155
}
176156

177157
/**
178-
* @param EventDispatcherInterface|null $dispatcher
179-
* @param HttpClientInterface|null $client
180-
* @param LoggerInterface|null $logger
181-
*
182158
* @return \Traversable<int, TransportFactoryInterface>
183159
*/
184-
public static function getDefaultFactories(/*EventDispatcherInterface $dispatcher = null, HttpClientInterface $client = null, LoggerInterface $logger = null*/): iterable
160+
public static function getDefaultFactories(EventDispatcherInterface $dispatcher = null, HttpClientInterface $client = null, LoggerInterface $logger = null): \Traversable
185161
{
186-
$dispatcher = 1 <= \func_num_args() ? func_get_arg(0) : null;
187-
$client = 2 <= \func_num_args() ? func_get_arg(1) : null;
188-
$logger = 3 <= \func_num_args() ? func_get_arg(2) : null;
189-
190162
foreach (self::FACTORY_CLASSES as $factoryClass) {
191163
if (class_exists($factoryClass)) {
192164
yield new $factoryClass($dispatcher, $client, $logger);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.