Problem/Motivation

The Mailgun client should be re-usable by other (sub-)modules.

Proposed resolution

Instead of passing the config factory to the mailgun handler service, we may create a new 'mailgun client' service and pass the API key from configuration to it.
This way we'll use Drupal's container to instantiate a Mailgun client for us.

Remaining tasks

Implement service definition (and maybe a client factory?).
Update mailgun_handler service definition to use a client injected with DI.

User interface changes

None.

API changes

A new service will be added.

Data model changes

None.

Comments

abramm created an issue. See original summary.

artem_sylchuk’s picture

Assigned: Unassigned » artem_sylchuk
artem_sylchuk’s picture

Status: Active » Needs review
StatusFileSize
new2.62 KB

Please take a look

abramm’s picture

Assigned: artem_sylchuk » Unassigned
Status: Needs review » Reviewed & tested by the community

Looks good for me; also I can confirm I've seen these changes working during the code sprint seesion. Let's wait for unit test results thought.

artem_sylchuk’s picture

StatusFileSize
new2.62 KB

matroskeen’s picture

Status: Reviewed & tested by the community » Fixed

Awesome! Thank you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.