You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install `dot-annotated-services` by running the following command in your project directory:
24
22
25
-
composer require dotkernel/dot-annotated-services
23
+
```shell
24
+
composer require dotkernel/dot-annotated-services
25
+
```
26
26
27
27
After installing, register `dot-annotated-services` in your project by adding the below line to your configuration aggregate (usually: `config/config.php`):
28
28
29
-
Dot\AnnotatedServices\ConfigProvider::class,
29
+
```php
30
+
Dot\AnnotatedServices\ConfigProvider::class,
31
+
```
30
32
31
33
## Usage
32
34
33
35
### Using the AttributedServiceFactory
34
36
35
37
You can register services in the service manager using `AttributedServiceFactory` as seen in the below example:
Copy file name to clipboardExpand all lines: docs/book/v5/overview.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,3 +3,7 @@
3
3
`dot-annotated-services` is DotKernel's dependency injection service.
4
4
5
5
By providing reusable factories for service and repository injection, it reduces code complexity in projects.
6
+
7
+
> `dot-annotated-services` v5 has been abandoned in favor of [dot-dependency-injection](https://github.com/dotkernel/dot-dependency-injection), which uses PHP attributes instead of annotations.
8
+
>
9
+
> Going forward, if you want to use annotations in your projects, use [dot-annotated-services v4](../v4/overview.md), else use `dot-dependency-injection`.
0 commit comments