From cd97eaab566b46add2688663dcaa476b2eaa75d3 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 3 Sep 2018 07:46:04 +0100 Subject: [PATCH] Add note about autowiring --- .../2018-08-21-experimenting-with-events-in-drupal-8.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/_posts/2018-08-21-experimenting-with-events-in-drupal-8.md b/source/_posts/2018-08-21-experimenting-with-events-in-drupal-8.md index f720ed3b..ea10eff1 100644 --- a/source/_posts/2018-08-21-experimenting-with-events-in-drupal-8.md +++ b/source/_posts/2018-08-21-experimenting-with-events-in-drupal-8.md @@ -39,6 +39,10 @@ services: - { name: event_subscriber } ``` +
+Adding `autowire: true` is not required for the event subscriber to work. I’m using it to automatically inject any dependencies into the class rather than specifying them separately as arguments. +
+ `src/EventSubscriber/SendTweet.php`: ```php