-
Notifications
You must be signed in to change notification settings - Fork 824
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
Circular dependency when using MAILER_DSN in env #10888
Comments
For future reference: There's some context for this in silverstripe/developer-docs#92 (comment) |
so if I understand correctly, using "after: framework" conflicts with "after: *" being used |
What's causing it is this config block From memory it was done this way so that a MAILER_DSN variable in .env would have priority over any other config, this would allow a webhost to update it rather than needing to make a code change Agree that the If that works OK then we can delete the contents of the yml block, though we'll probably still need to retain the yml block as an empty shell for BC in case anyone has an |
@emteknetnz and what about making a new factory Symfony\Component\Mailer\Transport\TransportInterface: => SilverStripe\Control\Email\TransportFactory that class simply extend the current Factory and overrides, if necessary, with env var in the constructor any parameter being passed. This way, you now for a fact that env var is going to be applied |
PR merged. |
@emteknetnz awesome :) |
Affected Version
5
Description
When using MAILER_DSN in env, it's very easy to get a circular dependency when using "after: - framework" for example
not sure why
i've found that replacing with "#corecache" works much better, so that's what i'm currently doing, but i'm not sure about the best practice here
I guess i'm not the only one who will be facing this :-)
Steps to Reproduce
Acceptance criteria
Related
#8507
PRs
The text was updated successfully, but these errors were encountered: