Skip to content

[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

Closed
wants to merge 6 commits into from

Conversation

claudiu-cristea
Copy link
Contributor

Q A
Branch? 6.4
Bug fix? no
New feature? yes
Deprecations? no
Tickets Fix #50961
License MIT
Doc PR symfony/symfony-docs#...

Provides a file DSN to be configured as file://path/to/relative/file.txt or file:///path/to/abolute/file.txt

Copy link
Contributor

@OskarStark OskarStark left a 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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong

Copy link
Contributor Author

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NULL -> null

Copy link
Contributor Author

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 ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBD

Copy link
Contributor Author

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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be you

Copy link
Contributor Author

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Sends the message to a file.
* Writes the message to a file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@claudiu-cristea
Copy link
Contributor Author

Added tests but I don't understand the failures. Seems not to be related

@claudiu-cristea
Copy link
Contributor Author

@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

@fabpot
Copy link
Member

fabpot commented Jul 31, 2023

Sorry, but I still think that this should not be provided by Symfony core (for the reasons I've listed in the linked ticket).

@fabpot fabpot closed this Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File transport
4 participants