Add note about autowiring
This commit is contained in:
parent
0acbe5d971
commit
cd97eaab56
|
@ -39,6 +39,10 @@ services:
|
||||||
- { name: event_subscriber }
|
- { name: event_subscriber }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<div class="note" markdown="1">
|
||||||
|
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.
|
||||||
|
</div>
|
||||||
|
|
||||||
`src/EventSubscriber/SendTweet.php`:
|
`src/EventSubscriber/SendTweet.php`:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
|
|
Loading…
Reference in a new issue