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

Persist mail configuration changes to storage. #182

Merged
merged 1 commit into from
Mar 20, 2018

Conversation

jhedstrom
Copy link
Owner

@jhedstrom jhedstrom added the bug label Mar 20, 2018
@jhedstrom jhedstrom added this to the 2.0 milestone Mar 20, 2018
@jhedstrom jhedstrom merged commit 7a1dd43 into master Mar 20, 2018
@jhedstrom jhedstrom deleted the 181-mail-config-save branch March 20, 2018 21:03
@jonathanjfshaw
Copy link
Contributor

I'm concerned about something here

+    $config = \Drupal::configFactory()->getEditable('system.mail');
+    $data = $config->getRawData();
+
+    // Save the original values for restoration after.
+    $this->originalConfiguration['system.mail'] = $data;

If startCollectingMail is called twice before stopCollectingMail is called (and I think this might happen in the parrallel behat extension PR), then test_mail_collector will end up being stored in $originalConfiguration and persisted.

Maybe we need to wrap the above hunk in
if (!isset($this->originalConfiguration['system.mail'])) {}

@jhedstrom
Copy link
Owner Author

Yeah, I think that change would make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants