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

Use "resolve" processor for MAILER_DSN env variable #1294

Closed
wants to merge 1 commit into from

Conversation

leonboot
Copy link

Q A
License MIT

For the Doctrine bundle, the DATABASE_URL variable is processed by the resolve env var processor. This is nice, since the value can be read from file by using the file processor when defining its value, for instance. It would be nice if this would be applied to the MAILER_DSN for the Symfony Mailer as well, for the same reasons.

Copy link

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-1294/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1294/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.

@leonboot
Copy link
Author

It seems the "Run updated recipes" job fails because the package version to install is distilled from the modified files of the PR, but symfony/mailer:^4.3 can't be installed because of its dependency on symfony/event-dispatcher.

Offering an updated PR by creating a 5.0 version of the recipe will probably still break the v6 test. And the change provided in this PR will still work for Symfony 4 as far as I can tell, since the resolve processor is already available there.

@nicolas-grekas
Copy link
Member

Hi, I'm not sure I understand the motivation for this change. What's the relation to the file processor?

@fabpot
Copy link
Member

fabpot commented May 8, 2024

Closing as there is no more feedback.

@fabpot fabpot closed this May 8, 2024
auto-merge was automatically disabled May 8, 2024 14:38

Pull request was closed

@leonboot
Copy link
Author

Looking at the documentation again, this may have been a result of misinterpretation on my part. I believed the resolve: env var processor would allow for using other env var processors in the env var's value (like file:DATABASE_URL_FILE, for instance). But looking at the docs, the resolve processor only resolved %variable% notations.

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.

None yet

3 participants