Add note about autowiring

This commit is contained in:
Oliver Davies 2018-09-03 07:46:04 +01:00
parent 0acbe5d971
commit cd97eaab56

View file

@ -39,6 +39,10 @@ services:
- { name: event_subscriber }
```
<div class="note" markdown="1">
Adding `autowire: true` is not required for the event subscriber to work. Im using it to automatically inject any dependencies into the class rather than specifying them separately as arguments.
</div>
`src/EventSubscriber/SendTweet.php`:
```php