Commit f93fbab
authored
Register client alias to support Symfony 5.3 Target attribute (#393)
When you are using Symfony 5.3 and you have multiple clients defined, you can use the `Target`
attribute to select the client that you want.
Example:
```php
final class MyService
{
public function __construct(
#[Target('my_client_alias')] HttpClient $client
) {}
}
```
It will now automatically inject `httplug.client.my_client_alias`.
For more information:
https://symfony.com/blog/new-in-symfony-5-3-service-autowiring-with-attributes1 parent eb9e1a3 commit f93fbab
2 files changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
384 | 388 | | |
385 | 389 | | |
386 | 390 | | |
| |||
0 commit comments