-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Mailer] File DNS transport #50962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mailer] File DNS transport #50962
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests missing
use Psr\Log\LoggerInterface; | ||
use Symfony\Component\Mailer\SentMessage; | ||
|
||
use function _PHPStan_690619d82\RingCentral\Psr7\str; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, leaked somehow. Fixed.
*/ | ||
final class FileTransport extends AbstractTransport | ||
{ | ||
public function __construct(EventDispatcherInterface $dispatcher = NULL, LoggerInterface $logger = NULL, protected Dsn $dsn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NULL -> null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drupal coding standards :) Fixed.
use Symfony\Component\Mailer\Exception\UnsupportedSchemeException; | ||
|
||
/** | ||
* @author ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
/** | ||
* Sends the message to a file. | ||
* | ||
* @author Fabien Potencier <fabien@symfony.com> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK :)
use function _PHPStan_690619d82\RingCentral\Psr7\str; | ||
|
||
/** | ||
* Sends the message to a file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Sends the message to a file. | |
* Writes the message to a file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Added tests but I don't understand the failures. Seems not to be related |
@OskarStark I cannot change the status to "needs review". Also I cannot re-trigger the tests. It seems to me that those were random failures, anyway not related to this change |
Sorry, but I still think that this should not be provided by Symfony core (for the reasons I've listed in the linked ticket). |
Provides a file DSN to be configured as
file://path/to/relative/file.txt
orfile:///path/to/abolute/file.txt