chore: replace global binds with dedicated service definition
This commit is contained in:
@@ -67,10 +67,6 @@ services:
|
||||
$termsAndConditionsUrl: '%terms_and_conditions_url%'
|
||||
$logger: '@monolog.logger.core'
|
||||
$environment: '%kernel.environment%'
|
||||
$mailjetApiKey: '%env(default::MAILJET_API_KEY)%'
|
||||
$mailjetApiSecret: '%env(default::MAILJET_API_SECRET)%'
|
||||
$mailjetApiBaseUrl: '%env(default::MAILJET_API_BASE_URL)%'
|
||||
$mailjetNewsletterListId: '%env(default::MAILJET_NEWSLETTER_LIST_ID)%'
|
||||
|
||||
# makes classes in src/ available to be used as services
|
||||
# this creates a service per class whose id is the fully-qualified class name
|
||||
@@ -191,3 +187,10 @@ services:
|
||||
$defaults:
|
||||
from: '%default_email_from%'
|
||||
to: '%default_email_to%'
|
||||
|
||||
App\Service\MailjetApiClient:
|
||||
arguments:
|
||||
$mailjetApiKey: '%env(default::MAILJET_API_KEY)%'
|
||||
$mailjetApiSecret: '%env(default::MAILJET_API_SECRET)%'
|
||||
$mailjetApiBaseUrl: '%env(default::MAILJET_API_BASE_URL)%'
|
||||
$mailjetNewsletterListId: '%env(default::MAILJET_NEWSLETTER_LIST_ID)%'
|
||||
|
||||
Reference in New Issue
Block a user