recipes
recipes copied to clipboard
Use "resolve" processor for MAILER_DSN env variable
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.
Thanks for the PR 😍
How to test these changes in your application
-
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
-
Install the package(s) related to this recipe:
composer req 'symfony/flex:^1.16' composer req 'symfony/mailer:^4.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.
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.
Hi, I'm not sure I understand the motivation for this change. What's the relation to the file
processor?
Closing as there is no more feedback.
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.