Skip to content

Commit 897dc37

Browse files
committed
Issue #60: Remove PHP 8.1 and add PHP 8.4 & 8.5 support
Signed-off-by: alexmerlin <[email protected]>
1 parent ec20a71 commit 897dc37

File tree

18 files changed

+27
-242
lines changed

18 files changed

+27
-242
lines changed

.github/workflows/codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
- "8.2"
1919
- "8.3"
2020
- "8.4"
21+
- "8.5"
2122

2223
steps:
2324
- name: Checkout

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
- "8.2"
1919
- "8.3"
2020
- "8.4"
21+
- "8.5"
2122

2223
steps:
2324
- name: Checkout

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
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.
44
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.
66

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.
88

99
## Documentation
1010

@@ -13,7 +13,7 @@ Documentation is available at: https://docs.dotkernel.org/dot-annotated-services
1313
## Badges
1414

1515
![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fdot-annotated-services%2Fblob%2F4.0%2FOSSMETADATA)
16-
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-annotated-services/4.3.0)
16+
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-annotated-services/4.4.0)
1717

1818
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-annotated-services)](https://github.com/dotkernel/dot-annotated-services/issues)
1919
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-annotated-services)](https://github.com/dotkernel/dot-annotated-services/network)
@@ -73,7 +73,7 @@ public function __construct(
7373
The annotation `@Inject` is telling the factory to inject the services between curly braces.
7474
Valid service names should be provided, as registered in the service manager.
7575

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.
7777

7878
```php
7979
use Dot\AnnotatedServices\Annotation\Inject;
@@ -87,7 +87,7 @@ which will inject `$container->get('config')['debug'];`
8787

8888
> Even if using dot annotation, the annotated factory will check first if a service name exists with that name.
8989
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.
9191

9292
### Using the AnnotatedRepositoryFactory
9393

@@ -123,7 +123,7 @@ class ExampleRepository extends EntityRepository
123123

124124
Using this approach, no service manager configuration is required. It uses the registered abstract factory to create annotated services.
125125

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.
127127

128128
```php
129129
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,
142142
## Cache annotations
143143

144144
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.
146146
See [Cache Drivers](https://github.com/doctrine/cache/tree/master/lib/Doctrine/Common/Cache) for available implementations offered by doctrine.
147147

148148
Below, we give an example, as defined in our frontend and admin starter applications:

SECURITY.md

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,28 @@
22

33
## Supported Versions
44

5-
65
| Version | Supported | PHP Version |
76
|---------|--------------------|------------------------------------------------------------------------------------------------------------------------|
8-
| 5.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-annotated-services/5.2.0) |
9-
| 4.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-annotated-services/4.2.0) |
7+
| 4.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-annotated-services/4.4.0) |
108
| <= 3.x | :x: | |
119

12-
1310
## Reporting Potential Security Issues
1411

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.
1814

1915
When reporting issues, please provide the following information:
2016

2117
- Component(s) affected
2218
- A description indicating how to reproduce the issue
2319
- A summary of the security vulnerability and impact
2420

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.
3123

3224
## Policy
3325

3426
If we verify a reported security vulnerability, our policy is:
3527

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.

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"service-manager"
2121
],
2222
"require": {
23-
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
23+
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
2424
"doctrine/annotations": "^1.14.3",
2525
"doctrine/cache": "^1.12.1 || ^2.1.1",
2626
"doctrine/orm" : "^2.20",
@@ -50,8 +50,8 @@
5050
],
5151
"cs-check": "phpcs",
5252
"cs-fix": "phpcbf",
53-
"test": "phpunit --colors=always",
54-
"static-analysis": "phpstan analyse --memory-limit 1G"
53+
"static-analysis": "phpstan analyse --memory-limit 1G",
54+
"test": "phpunit --colors=always"
5555
},
5656
"config": {
5757
"sort-packages": true,

docs/book/v4/cache.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
## Configuration
66

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.
88
See [Cache Drivers](https://github.com/doctrine/cache/tree/1.13.x/lib/Doctrine/Common/Cache) for available implementations offered by doctrine.
99

1010
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:
1212

1313
```php
1414
'annotations_cache_dir' => __DIR__ . '/../../data/cache/annotations',

docs/book/v4/factories.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Factories
22

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.
44

55
## AttributedRepositoryFactory
66

@@ -21,7 +21,7 @@ Injects class dependencies into classes.
2121
If a dependency is specified using the dot notation, `AttributedServiceFactory` will try to load a service having that specific alias.
2222
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.
2323

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.
2525

2626
### Exceptions thrown
2727

@@ -35,7 +35,7 @@ You can use the inject annotation on setters too, they will be called at creatio
3535

3636
Using this approach, no service manager configuration is required. It uses the registered abstract factory to create annotated services.
3737

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.
3939

4040
```php
4141
<?php

docs/book/v4/factories/repository.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Open the ConfigProvider of the module where your repository resides.
2727

2828
Add a new entry under `factories`, where the key is your repository FQCN and the value is `Dot\AnnotatedServices\Factory\AnnotatedRepositoryFactory::class`.
2929

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.
3131

3232
```php
3333
<?php

docs/book/v4/factories/service.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Open the ConfigProvider of the module where your class resides.
5454

5555
Add a new entry under `factories`, where the key is your class FQCN and the value is `Dot\AnnotatedServices\Factory\AnnotatedServiceFactory::class`.
5656

57-
See below example for a better understanding of the file structure.
57+
See the below example for a better understanding of the file structure.
5858

5959
```php
6060
<?php

docs/book/v4/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ By providing reusable factories for service and repository injection, it reduces
77
## Badges
88

99
![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fdot-annotated-services%2Fblob%2F4.0%2FOSSMETADATA)
10-
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-annotated-services/4.3.0)
10+
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-annotated-services/4.4.0)
1111

1212
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-annotated-services)](https://github.com/dotkernel/dot-annotated-services/issues)
1313
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-annotated-services)](https://github.com/dotkernel/dot-annotated-services/network)

0 commit comments

Comments
 (0)