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

Mail Extender #2012

Merged
merged 8 commits into from
Apr 13, 2020
Merged

Conversation

askvortsov1
Copy link
Member

@askvortsov1 askvortsov1 commented Feb 19, 2020

Improves result of #1986
Fixes part of #1891

Changes proposed in this pull request:

  • Added Mail Driver extender (we want SES to be maintained by community, so let's make their lives easier)
  • Integration tests for Mail Extender

Reviewers should focus on:

  • What else should this extender do beyond just adding drivers? Maybe some parts of PrettyMail can be made easier via this?

Confirmed

  • Backend changes: tests are green (run composer test).

Copy link
Contributor

@franzliedke franzliedke left a comment

Choose a reason for hiding this comment

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

Good suggestion!

Tests I'd like to see:

  • Calling add with a new driver makes the new driver appear in the /api/mail-settings endpoint
  • Calling add allows replacing existing drivers (e.g. a different set of fields appearing in /api/mail-settings)

Thank you! ❤️

src/Mail/DriverInterface.php Outdated Show resolved Hide resolved
@askvortsov1
Copy link
Member Author

  • Calling add with a new driver makes the new driver appear in the /api/mail-settings endpoint
  • Calling add allows replacing existing drivers (e.g. a different set of fields appearing in /api/mail-settings)

Added! The tests are currently failing, but that's due to an underlying issue that I've fixed in #2036.

Copy link
Contributor

@franzliedke franzliedke left a comment

Choose a reason for hiding this comment

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

Good stuff, thank you!

tests/integration/extenders/MailTest.php Outdated Show resolved Hide resolved
tests/integration/extenders/MailTest.php Outdated Show resolved Hide resolved
src/Extend/Mail.php Outdated Show resolved Hide resolved
@askvortsov1
Copy link
Member Author

Done, this now depends on #2052 to be merged first. We're going to need this authenticated request functionality anyway, so might as well get it done now!

src/Extend/Mail.php Outdated Show resolved Hide resolved
tests/integration/extenders/MailTest.php Outdated Show resolved Hide resolved
@franzliedke franzliedke mentioned this pull request Apr 13, 2020
78 tasks
Copy link
Contributor

@franzliedke franzliedke left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

(I'll make some minor tweaks directly in master after merging.)

@franzliedke franzliedke merged commit 2d86eb9 into flarum:master Apr 13, 2020
franzliedke added a commit that referenced this pull request Apr 13, 2020
- Use private over protected
- Use "public" API for building requests in tests
- Add more assertions
- Formatting
- Use correct parameter order for assertions

Refs #2012.
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.

2 participants