From e4bdc3db82f49430ddb88a5d4b99c732f2b1fb9b Mon Sep 17 00:00:00 2001 From: Mikhail Strachuk Date: Sun, 7 Jan 2018 11:23:06 -0800 Subject: [PATCH 1/4] Fixing path in Entity/Post --- src/Entity/Post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Entity/Post.php b/src/Entity/Post.php index 8bf6853a1..56cf5b7c6 100644 --- a/src/Entity/Post.php +++ b/src/Entity/Post.php @@ -35,7 +35,7 @@ class Post { /** * Use constants to define configuration options that rarely change instead - * of specifying them in app/config/config.yml. + * of specifying them under parameters section in config/services.yaml file. * * See https://symfony.com/doc/current/best_practices/configuration.html#constants-vs-configuration-options */ From 9c8ed6db90e3c3cb6360544f198282c25b1be690 Mon Sep 17 00:00:00 2001 From: Mikhail Strachuk Date: Sun, 7 Jan 2018 11:24:06 -0800 Subject: [PATCH 2/4] Fixing swiftmailer config path and added missing config for dev env --- config/packages/dev/swiftmailer.yaml | 4 ++-- src/EventSubscriber/CommentNotificationSubscriber.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/packages/dev/swiftmailer.yaml b/config/packages/dev/swiftmailer.yaml index 31fab6c65..f43807805 100644 --- a/config/packages/dev/swiftmailer.yaml +++ b/config/packages/dev/swiftmailer.yaml @@ -1,2 +1,2 @@ -#swiftmailer: - #delivery_address: me@example.com +swiftmailer: + disable_delivery: true diff --git a/src/EventSubscriber/CommentNotificationSubscriber.php b/src/EventSubscriber/CommentNotificationSubscriber.php index 42a3c4ca6..a4f8f7757 100644 --- a/src/EventSubscriber/CommentNotificationSubscriber.php +++ b/src/EventSubscriber/CommentNotificationSubscriber.php @@ -72,7 +72,7 @@ public function onCommentCreated(GenericEvent $event): void ->setBody($body, 'text/html') ; - // In app/config/config_dev.yml the 'disable_delivery' option is set to 'true'. + // In config/packages/dev/swiftmailer.yaml the 'disable_delivery' option is set to 'true'. // That's why in the development environment you won't actually receive any email. // However, you can inspect the contents of those unsent emails using the debug toolbar. // See https://symfony.com/doc/current/email/dev_environment.html#viewing-from-the-web-debug-toolbar From a86bda32f60ac89966ab7051aa0f9453f3a62d5e Mon Sep 17 00:00:00 2001 From: Mikhail Strachuk Date: Sun, 7 Jan 2018 11:25:24 -0800 Subject: [PATCH 3/4] Removing requirement to register twig extension in services.yaml --- src/Twig/AppExtension.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Twig/AppExtension.php b/src/Twig/AppExtension.php index 30b037637..323dc386f 100644 --- a/src/Twig/AppExtension.php +++ b/src/Twig/AppExtension.php @@ -23,9 +23,6 @@ * * See https://symfony.com/doc/current/cookbook/templating/twig_extension.html * - * In addition to creating the Twig extension class, before using it you must also - * register it as a service. See app/config/services.yml file for details. - * * @author Ryan Weaver * @author Javier Eguiluz * @author Julien ITARD From 6db8ba979b690bf69d7810b94028343cbb4bb585 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 10 Jan 2018 13:16:50 +0100 Subject: [PATCH 4/4] Update the SwiftMailer dev config to match recipe --- config/packages/dev/swiftmailer.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/packages/dev/swiftmailer.yaml b/config/packages/dev/swiftmailer.yaml index f43807805..5c36456a8 100644 --- a/config/packages/dev/swiftmailer.yaml +++ b/config/packages/dev/swiftmailer.yaml @@ -1,2 +1,4 @@ +# See https://symfony.com/doc/current/email/dev_environment.html swiftmailer: - disable_delivery: true + # send all emails to a specific address + #delivery_addresses: ['me@example.com']