Commit 1336ce7
committed
feature #281 [AIBundle] Improve injection aliases (Guikingone)
This PR was squashed before being merged into the main branch.
Discussion
----------
[AIBundle] Improve injection aliases
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| Docs? | no
| Issues | None
| License | MIT
Hi 👋🏻
This PR aims to add "injection aliases", those allows the user to use the following code while defining X agents:
```php
public function __construct(
private AgentInterface $fooAgent,
) {
}
```
Why the `Agent` suffix? Because we don't know, maybe one day, a service will be called `foo` and it will trigger an error, it seems better to define a suffix and ensure that this bundle is the only one to use it.
Commits
-------
6bbb878 [AIBundle] Improve injection aliasesFile tree
2 files changed
+18
-4
lines changed- src/ai-bundle
- src
- tests/DependencyInjection
2 files changed
+18
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | | - | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | 111 | | |
114 | 112 | | |
115 | 113 | | |
| |||
460 | 458 | | |
461 | 459 | | |
462 | 460 | | |
| 461 | + | |
463 | 462 | | |
464 | 463 | | |
465 | 464 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
33 | 48 | | |
34 | 49 | | |
35 | 50 | | |
| |||
0 commit comments