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
Copy file name to clipboardExpand all lines: README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
Dotkernel component used to create services through [Laminas Service Manager](https://github.com/laminas/laminas-servicemanager) and inject them with dependencies just using method annotations.
4
4
It can also create services without the need to write factories.
5
-
Annotation parsing can be cached, to improve performance.
5
+
Annotation parsing can be cached to improve performance.
6
6
7
-
This package can clean up your code, by getting rid of all the factories you write, sometimes just to inject a dependency or two.
7
+
This package can clean up your code by getting rid of all the factories you write, sometimes just to inject a dependency or two.
8
8
9
9
## Documentation
10
10
@@ -13,7 +13,7 @@ Documentation is available at: https://docs.dotkernel.org/dot-annotated-services
The annotation `@Inject` is telling the factory to inject the services between curly braces.
74
74
Valid service names should be provided, as registered in the service manager.
75
75
76
-
To inject an array value from the service manager, you can use dot notation as below,
76
+
To inject an array value from the service manager, you can use dot notation as below.
77
77
78
78
```php
79
79
use Dot\AnnotatedServices\Annotation\Inject;
@@ -87,7 +87,7 @@ which will inject `$container->get('config')['debug'];`
87
87
88
88
> Even if using dot annotation, the annotated factory will check first if a service name exists with that name.
89
89
90
-
You can use the inject annotation on setters too, they will be called at creation time and injected with the configured dependencies.
90
+
You can use the `@Inject` annotation on setters too, they will be called at creation time and injected with the configured dependencies.
91
91
92
92
### Using the AnnotatedRepositoryFactory
93
93
@@ -123,7 +123,7 @@ class ExampleRepository extends EntityRepository
123
123
124
124
Using this approach, no service manager configuration is required. It uses the registered abstract factory to create annotated services.
125
125
126
-
In order to tell the abstract factory which services are to be created, you need to annotate the service class with the `@Service` annotation.
126
+
To tell the abstract factory which services are to be created, you need to annotate the service class with the `@Service` annotation.
127
127
128
128
```php
129
129
use Dot\AnnotatedServices\Annotation\Service;
@@ -142,7 +142,7 @@ And that's it, you don't need to configure the service manager with this class,
142
142
## Cache annotations
143
143
144
144
This package is built on top of `doctrine/annotation` and `doctrine/cache`.
145
-
In order to cache annotations, you should register a service factory at key `AbstractAnnotatedFactory::CACHE_SERVICE` that should return a valid `Doctrine\Common\Cache\Cache` cache driver.
145
+
To cache annotations, you should register a service factory at key `AbstractAnnotatedFactory::CACHE_SERVICE` that should return a valid `Doctrine\Common\Cache\Cache` cache driver.
146
146
See [Cache Drivers](https://github.com/doctrine/cache/tree/master/lib/Doctrine/Common/Cache) for available implementations offered by doctrine.
147
147
148
148
Below, we give an example, as defined in our frontend and admin starter applications:
| 5.x |:white_check_mark:||
9
-
| 4.x |:white_check_mark:||
7
+
| 4.x |:white_check_mark:||
10
8
| <= 3.x |:x:||
11
9
12
-
13
10
## Reporting Potential Security Issues
14
11
15
-
If you have encountered a potential security vulnerability in this project,
16
-
please report it to us at <[email protected]>. We will work with you to
17
-
verify the vulnerability and patch it.
12
+
If you have encountered a potential security vulnerability in this project, please report it to us at <[email protected]>.
13
+
We will work with you to verify the vulnerability and patch it.
18
14
19
15
When reporting issues, please provide the following information:
20
16
21
17
- Component(s) affected
22
18
- A description indicating how to reproduce the issue
23
19
- A summary of the security vulnerability and impact
24
20
25
-
We request that you contact us via the email address above and give the
26
-
project contributors a chance to resolve the vulnerability and issue a new
27
-
release prior to any public exposure; this helps protect the project's
28
-
users, and provides them with a chance to upgrade and/or update in order to
29
-
protect their applications.
30
-
21
+
We request that you contact us via the email address above and give the project contributors a chance to resolve the vulnerability and issue a new release prior to any public exposure;
22
+
this helps protect the project's users and provides them with a chance to upgrade and/or update to protect their applications.
31
23
32
24
## Policy
33
25
34
26
If we verify a reported security vulnerability, our policy is:
35
27
36
-
- We will patch the current release branch, as well as the immediate prior minor
37
-
release branch.
38
-
39
-
- After patching the release branches, we will immediately issue new security
40
-
fix releases for each patched release branch.
28
+
- We will patch the current release branch, as well as the immediate prior minor release branch.
29
+
- After patching the release branches, we will immediately issue new security fix releases for each patched release branch.
Copy file name to clipboardExpand all lines: docs/book/v4/cache.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@
4
4
5
5
## Configuration
6
6
7
-
In order to cache annotations, you should register a service factory at key `AbstractAnnotatedFactory::CACHE_SERVICE` that should return a valid `Doctrine\Common\Cache\Cache` cache driver.
7
+
To cache annotations, you should register a service factory at key `AbstractAnnotatedFactory::CACHE_SERVICE` that should return a valid `Doctrine\Common\Cache\Cache` cache driver.
8
8
See [Cache Drivers](https://github.com/doctrine/cache/tree/1.13.x/lib/Doctrine/Common/Cache) for available implementations offered by doctrine.
9
9
10
10
See below an example on how you can configure `dot-annotated-services` to cache annotations.
11
-
You can add this configuration values to your application's Doctrine config file:
11
+
You can add this configuration value to your application's Doctrine config file:
Copy file name to clipboardExpand all lines: docs/book/v4/factories.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Factories
2
2
3
-
`dot-annotated-services` is based on 3 reusable factories - `AnnotatedRepositoryFactory`, `AnnotatedServiceFactory` and `AnnotatedServiceAbstractFactory` - able to inject any dependency into a class.
3
+
`dot-annotated-services` is based on three reusable factories - `AnnotatedRepositoryFactory`, `AnnotatedServiceFactory` and `AnnotatedServiceAbstractFactory` - able to inject any dependency into a class.
4
4
5
5
## AttributedRepositoryFactory
6
6
@@ -21,7 +21,7 @@ Injects class dependencies into classes.
21
21
If a dependency is specified using the dot notation, `AttributedServiceFactory` will try to load a service having that specific alias.
22
22
If it does not find one, it will try to load the dependency as a config tree, checking each segment if it's available in the service container.
23
23
24
-
You can use the inject annotation on setters too, they will be called at creation time and injected with the configured dependencies.
24
+
You can use the `@Inject` annotation on setters too, they will be called at creation time and injected with the configured dependencies.
25
25
26
26
### Exceptions thrown
27
27
@@ -35,7 +35,7 @@ You can use the inject annotation on setters too, they will be called at creatio
35
35
36
36
Using this approach, no service manager configuration is required. It uses the registered abstract factory to create annotated services.
37
37
38
-
In order to tell the abstract factory which services are to be created, you need to annotate the service class with the `@Service` annotation.
38
+
To tell the abstract factory which services are to be created, you need to annotate the service class with the `@Service` annotation.
Copy file name to clipboardExpand all lines: docs/book/v4/factories/repository.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ Open the ConfigProvider of the module where your repository resides.
27
27
28
28
Add a new entry under `factories`, where the key is your repository FQCN and the value is `Dot\AnnotatedServices\Factory\AnnotatedRepositoryFactory::class`.
29
29
30
-
See below example for a better understanding of the file structure.
30
+
See the below example for a better understanding of the file structure.
0 commit comments