Skip to content
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

[symfony/mailer] use null://null for MAILER_DSN #1071

Merged
merged 2 commits into from
Apr 3, 2022

Conversation

kbond
Copy link
Member

@kbond kbond commented Mar 30, 2022

Q A
License MIT
Doc issue/PR n/a

This makes it easier to run tests that send emails "out of the box".

@github-actions github-actions bot enabled auto-merge (squash) March 30, 2022 13:07
@github-actions
Copy link

github-actions bot commented Mar 30, 2022

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1071/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1071/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'symfony/mailer:^4.3'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

@Kocal
Copy link
Member

Kocal commented Mar 30, 2022

We could simply update the .env.test and add the line MAILER_DSN=null://null, no?

@kbond
Copy link
Member Author

kbond commented Mar 30, 2022

I don't believe the recipe can update .env.test, can it? Or are you suggesting adding to the phpunit/phpunit-bridge recipes?

@Kocal
Copy link
Member

Kocal commented Mar 30, 2022

I don't believe the recipe can update .env.test, can it?

Yeah it looks like it can: https://github.com/symfony/recipes/blob/master/phpunit/phpunit/4.7/manifest.json#L3

Or are you suggesting adding to the phpunit/phpunit-bridge recipes?

Yes, and in the phpunit/phpunit recipe too!

But that was just a suggestion, I don't know what solution prefers the core team 👀

@kbond
Copy link
Member Author

kbond commented Mar 30, 2022

Yeah it looks like it can

I meant add a single line to the .env.test file.

But that was just a suggestion

Both achieve the same thing, doesn't matter to me. Adding the the phpunit/phpunit-bridge recipes seems simpler.

@kbond kbond changed the title [symfony/mailer] add 5.4 recipe with null://null test dsn [symfony/mailer] use null://null for MAILER_DSN Apr 1, 2022
@kbond
Copy link
Member Author

kbond commented Apr 1, 2022

I modified this PR to just always use null://null instead of smtp://localhost. I feel it rather unlikely someone has a local mail server. The docker integration is unaffected by this.

Copy link
Member

@fabpot fabpot left a comment

Choose a reason for hiding this comment

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

I think it makes sense.

@fabpot fabpot disabled auto-merge April 3, 2022 17:35
@fabpot fabpot merged commit c88ce96 into symfony:master Apr 3, 2022
@kbond kbond deleted the mailer-test branch April 3, 2022 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants